Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\kmemleak.c Create Date:2022-07-28 16:22:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:static void scan_gray_list(void)

Type:void

Parameter:Nothing

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.(next, typeof( * object), he list of gray-colored objects (see color_gray comment below) )
1374  When gray_list != he list of gray-colored objects (see color_gray comment below) cycle
1375  cond_resched()
1378  If Not Memory scanning is a long process and it needs to be interruptable. This* function checks whether such interrupt condition occurred. Then 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.(next, typeof( * object), he list of gray-colored objects (see color_gray comment below) )
1385  deletes entry from list
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(!list_empty - tests whether a list is empty*@head: the list to test.)
Caller
NameDescribe
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.