函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\kmemleak.c Create Date:2022-07-27 17:56:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Scan the objects already referenced (gray objects). More objects will be* referenced and, if there are no memory leaks, all the objects are scanned.

函数原型:static void scan_gray_list(void)

返回类型:void

参数:

1373  object等于list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(链表后项, typeof( * object), he list of gray-colored objects (see color_gray comment below) )
1374 gray_list不等于he list of gray-colored objects (see color_gray comment below) 循环
1375  cond_resched()
1378  如果非Memory scanning is a long process and it needs to be interruptable. This* function checks whether such interrupt condition occurred.Scan a memory block corresponding to a kmemleak_object. A condition is* that object->use_count >= 1.
1381  tmp等于list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(链表后项, typeof( * object), he list of gray-colored objects (see color_gray comment below) )
1385  删除链表项
1386  Decrement the object use_count. Once the count is 0, free the object using* an RCU callback. Since put_object() may be called via the kmemleak_free() ->* delete_object() path, the delayed RCU freeing ensures that there is no
1388  object等于tmp
1390  WARN_ON(!链表为空)
调用者
名称描述
kmemleak_scanScan data sections and all the referenced memory blocks allocated via the* kernel's standard allocators. This function must be called with the* scan_mutex held.