Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__debug_object_init

Proto:static void __debug_object_init(void *addr, struct debug_obj_descr *descr, int onstack)

Type:void

Parameter:

TypeParameterName
void *addr
struct debug_obj_descr *descr
intonstack
535  bool check_stack = false
540  fill_pool()
542  db = We use the pfn of the address for the hash. That way we can check* for freed objects simply by checking the affected bucket.
544  raw_spin_lock_irqsave( & lock, flags)
546  obj = Lookup an object in the hash bucket.
547  If Not obj Then
548  obj = Allocate a new object. If the pool is empty, switch off the debugger.* Must be called with interrupts disabled.
549  If Not obj Then
553  Return
555  check_stack = true
559  Case state == ODEBUG_STATE_NONE
560  Case state == ODEBUG_STATE_INIT
563  Break
565  Case state == ODEBUG_STATE_ACTIVE
566  state = state
568  debug_print_object(obj, "init")
570  Return
574  debug_print_object(obj, "init")
575  Return
576  Default
577  Break
580  raw_spin_unlock_irqrestore( & lock, flags)
581  If check_stack Then debug_object_is_on_stack(addr, onstack)
Caller
NameDescribe
debug_object_initdebug_object_init - debug checks when an object is initialized*@addr: address of the object*@descr: pointer to an object specific debug description structure
debug_object_init_on_stackdebug_object_init_on_stack - debug checks when an object on stack is* initialized*@addr: address of the object*@descr: pointer to an object specific debug description structure