Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:debug_object_destroy - debug checks when an object is destroyed*@addr: address of the object*@descr: pointer to an object specific debug description structure

Proto:void debug_object_destroy(void *addr, struct debug_obj_descr *descr)

Type:void

Parameter:

TypeParameterName
void *addr
struct debug_obj_descr *descr
756  bool print_object = false
758  If Not debug_objects_enabled Then Return
761  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.
763  raw_spin_lock_irqsave( & lock, flags)
765  obj = Lookup an object in the hash bucket.
766  If Not obj Then Go to out_unlock
770  Case state == ODEBUG_STATE_NONE
771  Case state == ODEBUG_STATE_INIT
772  Case state == ODEBUG_STATE_INACTIVE
773  state = ODEBUG_STATE_DESTROYED
774  Break
775  Case state == ODEBUG_STATE_ACTIVE
776  state = state
777  raw_spin_unlock_irqrestore( & lock, flags)
778  debug_print_object(obj, "destroy")
779  Try to repair the damage, so we have a better chance to get useful* debug output.
780  Return
782  Case state == ODEBUG_STATE_DESTROYED
783  print_object = true
784  Break
785  Default
786  Break
788  out_unlock :
789  raw_spin_unlock_irqrestore( & lock, flags)
790  If print_object Then debug_print_object(obj, "destroy")