函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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.

函数原型:int debug_object_activate(void *addr, struct debug_obj_descr *descr)

返回类型:int

参数:

类型参数名称
void *addr
struct debug_obj_descr *descr
627  struct debug_obj o = {object = addr, state = ODEBUG_STATE_NOTAVAILABLE, descr = descr}
631  如果非debug_objects_enabled则返回: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  如果obj
640  bool print_object = false
643  :state恒等于ODEBUG_STATE_INIT
646  ret等于0
647  退出
649  :state恒等于ODEBUG_STATE_ACTIVE
650  state等于state
652  debug_print_object(obj, "activate")
654  返回:如果ret则0否则负EINVAL
657  print_object = true
658  ret等于负EINVAL
659  退出
660  默认
661  ret等于0
662  退出
664  raw_spin_unlock_irqrestore( & lock, flags)
665  如果print_objectdebug_print_object(obj, "activate")
667  返回:ret
670  raw_spin_unlock_irqrestore( & lock, flags)
679  如果is_static_objectis_static_object(addr)则
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  否则
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  返回:如果ret则0否则负EINVAL
689  返回:0
调用者
名称描述
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.