Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:debug_object_activate - debug checks when an object is activated*@addr: address of the object*@descr: pointer to an object specific debug description structure* Returns 0 for success, -EINVAL for check failed.

Proto:int debug_object_activate(void *addr, struct debug_obj_descr *descr)

Type:int

Parameter:

TypeParameterName
void *addr
struct debug_obj_descr *descr
627  struct debug_obj o = {object = addr, state = ODEBUG_STATE_NOTAVAILABLE, descr = descr}
631  If Not debug_objects_enabled Then Return 0
634  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.
636  raw_spin_lock_irqsave( & lock, flags)
638  obj = Lookup an object in the hash bucket.
639  If obj Then
640  bool print_object = false
643  Case state == ODEBUG_STATE_INIT
646  ret = 0
647  Break
649  Case state == ODEBUG_STATE_ACTIVE
650  state = state
652  debug_print_object(obj, "activate")
654  Return If ret Then 0 Else -EINVAL
657  print_object = true
658  ret = -EINVAL
659  Break
660  Default
661  ret = 0
662  Break
664  raw_spin_unlock_irqrestore( & lock, flags)
665  If print_object Then debug_print_object(obj, "activate")
667  Return ret
670  raw_spin_unlock_irqrestore( & lock, flags)
679  If is_static_object && is_static_object(addr) Then
681  debug_object_init - debug checks when an object is initialized*@addr: address of the object*@descr: pointer to an object specific debug description structure
682  debug_object_activate - debug checks when an object is activated*@addr: address of the object*@descr: pointer to an object specific debug description structure* Returns 0 for success, -EINVAL for check failed.
683  Else
684  debug_print_object( & o, "activate")
685  ret = Try to repair the damage, so we have a better chance to get useful* debug output.
687  Return If ret Then 0 Else -EINVAL
689  Return 0
Caller
NameDescribe
debug_object_activatedebug_object_activate - debug checks when an object is activated*@addr: address of the object*@descr: pointer to an object specific debug description structure* Returns 0 for success, -EINVAL for check failed.