Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:void debug_object_active_state(void *addr, struct debug_obj_descr *descr, unsigned int expect, unsigned int next)

Type:void

Parameter:

TypeParameterName
void *addr
struct debug_obj_descr *descr
unsigned intexpect
unsigned intnext
895  bool print_object = false
897  If Not debug_objects_enabled Then Return
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  If obj Then
907  Case state == ODEBUG_STATE_ACTIVE
908  If astate == expect Then astate = next
910  Else print_object = true
912  Break
914  Default
915  print_object = true
916  Break
920  raw_spin_unlock_irqrestore( & lock, flags)
921  If Not obj Then
922  struct debug_obj o = {object = addr, state = ODEBUG_STATE_NOTAVAILABLE, descr = descr}
926  debug_print_object( & o, "active_state")
927  Else if print_object Then
928  debug_print_object(obj, "active_state")