函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:debug_object_active_state - debug checks object usage state machine*@addr: address of the object*@descr: pointer to an object specific debug description structure*@expect: expected state*@next: state to move to if expected state is found

函数原型:void debug_object_active_state(void *addr, struct debug_obj_descr *descr, unsigned int expect, unsigned int next)

返回类型:void

参数:

类型参数名称
void *addr
struct debug_obj_descr *descr
unsigned intexpect
unsigned intnext
895  bool print_object = false
897  如果非debug_objects_enabled则返回
900  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.
902  raw_spin_lock_irqsave( & lock, flags)
904  obj等于Lookup an object in the hash bucket.
905  如果obj
907  :state恒等于ODEBUG_STATE_ACTIVE
908  如果astate恒等于expectastate等于next
910  否则print_object = true
912  退出
914  默认
915  print_object = true
916  退出
920  raw_spin_unlock_irqrestore( & lock, flags)
921  如果非obj
922  struct debug_obj o = {object = addr, state = ODEBUG_STATE_NOTAVAILABLE, descr = descr}
926  debug_print_object( & o, "active_state")
927  否则如果print_object
928  debug_print_object(obj, "active_state")