Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static void put_object(struct kmemleak_object *object)

Type:void

Parameter:

TypeParameterName
struct kmemleak_object *object
491  If Not atomic_dec_and_test( & bject usage count; object freed when use_count == 0 ) Then Return
495  WARN_ON(bject status flags & lag representing the memory block allocation status )
502  If allocation caches for kmemleak internal data Then 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  Else RCU callback to free a kmemleak_object.
Caller
NameDescribe
__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