Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Look up an object in the object search tree and remove it from both* object_tree_root and object_list. The returned object's use_count should be* at least 1, as initially set by create_object().

Proto:static struct kmemleak_object *find_and_remove_object(unsigned long ptr, int alias)

Type:struct kmemleak_object

Parameter:

TypeParameterName
unsigned longptr
intalias
549  write_lock_irqsave( & w_lock protecting the access to object_list and object_tree_root , flags)
550  object = Look-up a memory block metadata (kmemleak_object) in the object search* tree based on a pointer value. If alias is 0, only values pointing to the* beginning of the memory block are allowed. The kmemleak_lock must be held* when calling this function.
551  If object Then Remove an object from the object_tree_root and object_list. Must be called* with the kmemleak_lock held _if_ kmemleak is still enabled.
553  write_unlock_irqrestore( & w_lock protecting the access to object_list and object_tree_root , flags)
555  Return object
Caller
NameDescribe
delete_object_fullLook up the metadata (struct kmemleak_object) corresponding to ptr and* delete it.
delete_object_partLook up the metadata (struct kmemleak_object) corresponding to ptr and* delete it. If the memory block is partially freed, the function may create* additional metadata for the remaining parts of the block.