函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:static void put_object(struct kmemleak_object *object)

返回类型:void

参数:

类型参数名称
struct kmemleak_object *object
491  如果非atomic_dec_and_test( & bject usage count; object freed when use_count == 0 )则返回
495  WARN_ON(bject status flags & lag representing the memory block allocation status )
502  如果allocation caches for kmemleak internal data Post an RCU callback to be invoked after the end of an RCU grace* period. But since we have but one CPU, that would be after any* quiescent state.
504  否则RCU callback to free a kmemleak_object.
调用者
名称描述
__delete_objectMark the object as not allocated and schedule RCU freeing via put_object().
paint_ptr
add_scan_areaAdd a scanning area to the object. If at least one such area is added,* kmemleak will only scan these ranges rather than the whole memory block.
object_set_excess_refAny surplus references (object already gray) to 'ptr' are passed to* 'excess_ref'. This is used in the vmalloc() case where a pointer to* vm_struct may be used as an alternative reference to the vmalloc'ed object* (see free_thread_stack()).
object_no_scanSet the OBJECT_NO_SCAN flag for the object corresponding to the give* pointer. Such object will not be scanned by kmemleak but references to it* are searched.
kmemleak_update_tracekmemleak_update_trace - update object allocation stack trace*@ptr: pointer to beginning of the object* Override the object allocation stack trace for cases where the actual* allocation place is not always useful.
scan_gray_listScan the objects already referenced (gray objects). More objects will be* referenced and, if there are no memory leaks, all the objects are scanned.
kmemleak_seq_nextReturn the next object in the object_list. The function decrements the* use_count of the previous object and increases that of the next one.
kmemleak_seq_stopDecrement the use_count of the last object required, if any.
dump_str_object_info