sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}(hhparenthuba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget*/translations/zh_CN/core-api/debug-objectsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}(hhhh2ubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/core-api/debug-objectsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}(hhhhFubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/core-api/debug-objectsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}(hhhhZubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/core-api/debug-objectsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}(hhhhnubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/core-api/debug-objectsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}(hhhhubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/core-api/debug-objectsmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h,The object-lifetime debugging infrastructureh]h,The object-lifetime debugging infrastructure}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhD/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects.rsthKubh field_list)}(hhh]hfield)}(hhh](h field_name)}(hAuthorh]hAuthor}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh field_body)}(hThomas Gleixner h]h paragraph)}(hThomas Gleixnerh]hThomas Gleixner}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Introductionh]h Introduction}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hwdebugobjects is a generic infrastructure to track the life time of kernel objects and validate the operations on those.h]hwdebugobjects is a generic infrastructure to track the life time of kernel objects and validate the operations on those.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hAdebugobjects is useful to check for the following error patterns:h]hAdebugobjects is useful to check for the following error patterns:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh bullet_list)}(hhh](h list_item)}(h$Activation of uninitialized objects h]h)}(h#Activation of uninitialized objectsh]h#Activation of uninitialized objects}(hj3hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj-ubah}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubj,)}(h!Initialization of active objects h]h)}(h Initialization of active objectsh]h Initialization of active objects}(hjKhjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjEubah}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubj,)}(h!Usage of freed/destroyed objects h]h)}(h Usage of freed/destroyed objectsh]h Usage of freed/destroyed objects}(hjchjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj]ubah}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1j&hhhKhhhhubh)}(hdebugobjects is not changing the data structure of the real object so it can be compiled in with a minimal runtime impact and enabled on demand with a kernel command line option.h]hdebugobjects is not changing the data structure of the real object so it can be compiled in with a minimal runtime impact and enabled on demand with a kernel command line option.}(hjhj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h] introductionah ]h"] introductionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hHowto use debugobjectsh]hHowto use debugobjects}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXA kernel subsystem needs to provide a data structure which describes the object type and add calls into the debug code at appropriate places. The data structure to describe the object type needs at minimum the name of the object type. Optional functions can and should be provided to fixup detected problems so the kernel can continue to work and the debug information can be retrieved from a live system instead of hard core debugging with serial consoles and stack trace transcripts from the monitor.h]hXA kernel subsystem needs to provide a data structure which describes the object type and add calls into the debug code at appropriate places. The data structure to describe the object type needs at minimum the name of the object type. Optional functions can and should be provided to fixup detected problems so the kernel can continue to work and the debug information can be retrieved from a live system instead of hard core debugging with serial consoles and stack trace transcripts from the monitor.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h-The debug calls provided by debugobjects are:h]h-The debug calls provided by debugobjects are:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjhhubj')}(hhh](j,)}(hdebug_object_init h]h)}(hdebug_object_inith]hdebug_object_init}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubj,)}(hdebug_object_init_on_stack h]h)}(hdebug_object_init_on_stackh]hdebug_object_init_on_stack}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubj,)}(hdebug_object_activate h]h)}(hdebug_object_activateh]hdebug_object_activate}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubj,)}(hdebug_object_deactivate h]h)}(hdebug_object_deactivateh]hdebug_object_deactivate}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hj ubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubj,)}(hdebug_object_destroy h]h)}(hdebug_object_destroyh]hdebug_object_destroy}(hj)hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hj#ubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubj,)}(hdebug_object_free h]h)}(hdebug_object_freeh]hdebug_object_free}(hjAhj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hj;ubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubj,)}(hdebug_object_assert_init h]h)}(hdebug_object_assert_inith]hdebug_object_assert_init}(hjYhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjSubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubeh}(h]h ]h"]h$]h&]j{j|uh1j&hhhK'hjhhubh)}(hEach of these functions takes the address of the real object and a pointer to the object type specific debug description structure.h]hEach of these functions takes the address of the real object and a pointer to the object type specific debug description structure.}(hjshjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjhhubh)}(h|Each detected error is reported in the statistics and a limited number of errors are printk'ed including a full stack trace.h]h~Each detected error is reported in the statistics and a limited number of errors are printk’ed including a full stack trace.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjhhubh)}(hXThe statistics are available via /sys/kernel/debug/debug_objects/stats. They provide information about the number of warnings and the number of successful fixups along with information about the usage of the internal tracking objects and the state of the internal tracking objects pool.h]hXThe statistics are available via /sys/kernel/debug/debug_objects/stats. They provide information about the number of warnings and the number of successful fixups along with information about the usage of the internal tracking objects and the state of the internal tracking objects pool.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjhhubeh}(h]howto-use-debugobjectsah ]h"]howto use debugobjectsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hDebug functionsh]hDebug functions}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKAubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singledebug_object_init (C function)c.debug_object_inithNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hHvoid debug_object_init (void *addr, const struct debug_obj_descr *descr)h]hdesc_signature_line)}(hGvoid debug_object_init(void *addr, const struct debug_obj_descr *descr)h](hdesc_sig_keyword_type)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjhhhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:67: ./lib/debugobjects.chMubhdesc_sig_space)}(h h]h }(hhhjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhMubh desc_name)}(hdebug_object_inith]h desc_sig_name)}(hdebug_object_inith]hdebug_object_init}(hhhjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&] xml:spacepreserveuh1jhjhhhjhMubhdesc_parameterlist)}(h1(void *addr, const struct debug_obj_descr *descr)h](hdesc_parameter)}(h void *addrh](j)}(hvoidh]hvoid}(hhhj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(h h]h }(hhhj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubhdesc_sig_punctuation)}(h*h]h*}(hhhjDhhhNhNubah}(h]h ]pah"]h$]h&]uh1jBhj"ubj)}(haddrh]haddr}(hhhjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubj!)}(h#const struct debug_obj_descr *descrh](hdesc_sig_keyword)}(hconsth]hconst}(hhhjnhhhNhNubah}(h]h ]kah"]h$]h&]uh1jlhjhubj)}(h h]h }(hhhj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubjm)}(hstructh]hstruct}(hhhjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjhubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubh)}(hhh]j)}(hdebug_obj_descrh]hdebug_obj_descr}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jjsbc.debug_object_initasbuh1hhjhubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubjC)}(hjFh]h*}(hhhjhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhjhubj)}(hdescrh]hdescr}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jj add_permalinkuh1jsphinx_line_type declaratorhjhhhjhMubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multilineuh1jhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:67: ./lib/debugobjects.chMhjhhubh desc_content)}(hhh]h)}(h*debug checks when an object is initializedh]h*debug checks when an object is initialized}(hj#hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:67: ./lib/debugobjects.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypej9desctypej9noindexuh1jhhhjhNhNubh container)}(h**Parameters** ``void *addr`` address of the object ``const struct debug_obj_descr *descr`` pointer to an object specific debug description structureh](h)}(h**Parameters**h]hstrong)}(hjIh]h Parameters}(hhhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jKhjGubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:67: ./lib/debugobjects.chMhjCubhdefinition_list)}(hhh](hdefinition_list_item)}(h%``void *addr`` address of the object h](hterm)}(h``void *addr``h]hliteral)}(hjph]h void *addr}(hhhjthhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjnubah}(h]h ]h"]h$]h&]uh1jlhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:67: ./lib/debugobjects.chMhjhubh definition)}(hhh]h)}(haddress of the objecth]haddress of the object}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjhubeh}(h]h ]h"]h$]h&]uh1jfhjhMhjcubjg)}(ha``const struct debug_obj_descr *descr`` pointer to an object specific debug description structureh](jm)}(h'``const struct debug_obj_descr *descr``h]js)}(hjh]h#const struct debug_obj_descr *descr}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:67: ./lib/debugobjects.chMhjubj)}(hhh]h)}(h9pointer to an object specific debug description structureh]h9pointer to an object specific debug description structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:67: ./lib/debugobjects.chMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jfhjhMhjcubeh}(h]h ]h"]h$]h&]uh1jahjCubeh}(h]h ] kernelindentah"]h$]h&]uh1jAhjhhhNhNubh)}(hXThis function is called whenever the initialization function of a real object is called.h]hXThis function is called whenever the initialization function of a real object is called.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKFhjhhubh)}(hXWhen the real object is already tracked by debugobjects it is checked, whether the object can be initialized. Initializing is not allowed for active and destroyed objects. When debugobjects detects an error, then it calls the fixup_init function of the object type description structure if provided by the caller. The fixup function can correct the problem before the real initialization of the object happens. E.g. it can deactivate an active object in order to prevent damage to the subsystem.h]hXWhen the real object is already tracked by debugobjects it is checked, whether the object can be initialized. Initializing is not allowed for active and destroyed objects. When debugobjects detects an error, then it calls the fixup_init function of the object type description structure if provided by the caller. The fixup function can correct the problem before the real initialization of the object happens. E.g. it can deactivate an active object in order to prevent damage to the subsystem.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjhhubh)}(hXWhen the real object is not yet tracked by debugobjects, debugobjects allocates a tracker object for the real object and sets the tracker object state to ODEBUG_STATE_INIT. It verifies that the object is not on the callers stack. If it is on the callers stack then a limited number of warnings including a full stack trace is printk'ed. The calling code must use debug_object_init_on_stack() and remove the object before leaving the function which allocated it. See next section.h]hXWhen the real object is not yet tracked by debugobjects, debugobjects allocates a tracker object for the real object and sets the tracker object state to ODEBUG_STATE_INIT. It verifies that the object is not on the callers stack. If it is on the callers stack then a limited number of warnings including a full stack trace is printk’ed. The calling code must use debug_object_init_on_stack() and remove the object before leaving the function which allocated it. See next section.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'debug_object_init_on_stack (C function)c.debug_object_init_on_stackhNtauh1jhjhhhNhNubj)}(hhh](j)}(hQvoid debug_object_init_on_stack (void *addr, const struct debug_obj_descr *descr)h]j)}(hPvoid debug_object_init_on_stack(void *addr, const struct debug_obj_descr *descr)h](j)}(hvoidh]hvoid}(hhhj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-hhhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:90: ./lib/debugobjects.chMubj)}(h h]h }(hhhj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-hhhj?hMubj)}(hdebug_object_init_on_stackh]j)}(hdebug_object_init_on_stackh]hdebug_object_init_on_stack}(hhhjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjNubah}(h]h ](jjeh"]h$]h&]jjuh1jhj-hhhj?hMubj)}(h1(void *addr, const struct debug_obj_descr *descr)h](j!)}(h void *addrh](j)}(hvoidh]hvoid}(hhhjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj)}(h h]h }(hhhj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubjC)}(hjFh]h*}(hhhjhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhjjubj)}(haddrh]haddr}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjfubj!)}(h#const struct debug_obj_descr *descrh](jm)}(hjph]hconst}(hhhjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hdebug_obj_descrh]hdebug_obj_descr}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjTsbc.debug_object_init_on_stackasbuh1hhjubj)}(h h]h }(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjC)}(hjFh]h*}(hhhjhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhjubj)}(hdescrh]hdescr}(hhhj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjfubeh}(h]h ]h"]h$]h&]jjuh1jhj-hhhj?hMubeh}(h]h ]h"]h$]h&]jjjuh1jjjhj)hhhj?hMubah}(h]j$ah ](jjeh"]h$]h&]juh1jhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:90: ./lib/debugobjects.chMhj&hhubj)}(hhh]h)}(h3debug checks when an object on stack is initializedh]h3debug checks when an object on stack is initialized}(hjQhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:90: ./lib/debugobjects.chMhjLhhubah}(h]h ]h"]h$]h&]uh1jhj&hhhj?hMubeh}(h]h ](jfunctioneh"]h$]h&]j=jj>jgj?jgj@uh1jhhhjhNhNubjB)}(h**Parameters** ``void *addr`` address of the object ``const struct debug_obj_descr *descr`` pointer to an object specific debug description structureh](h)}(h**Parameters**h]jL)}(hjqh]h Parameters}(hhhjshhhNhNubah}(h]h ]h"]h$]h&]uh1jKhjoubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:90: ./lib/debugobjects.chMhjkubjb)}(hhh](jg)}(h%``void *addr`` address of the object h](jm)}(h``void *addr``h]js)}(hjh]h void *addr}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:90: ./lib/debugobjects.chMhjubj)}(hhh]h)}(haddress of the objecth]haddress of the object}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jfhjhMhjubjg)}(ha``const struct debug_obj_descr *descr`` pointer to an object specific debug description structureh](jm)}(h'``const struct debug_obj_descr *descr``h]js)}(hjh]h#const struct debug_obj_descr *descr}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:90: ./lib/debugobjects.chMhjubj)}(hhh]h)}(h9pointer to an object specific debug description structureh]h9pointer to an object specific debug description structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:90: ./lib/debugobjects.chMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jfhjhMhjubeh}(h]h ]h"]h$]h&]uh1jahjkubeh}(h]h ] kernelindentah"]h$]h&]uh1jAhjhhhNhNubh)}(hsThis function is called whenever the initialization function of a real object which resides on the stack is called.h]hsThis function is called whenever the initialization function of a real object which resides on the stack is called.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjhhubh)}(hXWhen the real object is already tracked by debugobjects it is checked, whether the object can be initialized. Initializing is not allowed for active and destroyed objects. When debugobjects detects an error, then it calls the fixup_init function of the object type description structure if provided by the caller. The fixup function can correct the problem before the real initialization of the object happens. E.g. it can deactivate an active object in order to prevent damage to the subsystem.h]hXWhen the real object is already tracked by debugobjects it is checked, whether the object can be initialized. Initializing is not allowed for active and destroyed objects. When debugobjects detects an error, then it calls the fixup_init function of the object type description structure if provided by the caller. The fixup function can correct the problem before the real initialization of the object happens. E.g. it can deactivate an active object in order to prevent damage to the subsystem.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjhhubh)}(hWhen the real object is not yet tracked by debugobjects debugobjects allocates a tracker object for the real object and sets the tracker object state to ODEBUG_STATE_INIT. It verifies that the object is on the callers stack.h]hWhen the real object is not yet tracked by debugobjects debugobjects allocates a tracker object for the real object and sets the tracker object state to ODEBUG_STATE_INIT. It verifies that the object is on the callers stack.}(hj(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjhhubh)}(hAn object which is on the stack must be removed from the tracker by calling debug_object_free() before the function which allocates the object returns. Otherwise we keep track of stale objects.h]hAn object which is on the stack must be removed from the tracker by calling debug_object_free() before the function which allocates the object returns. Otherwise we keep track of stale objects.}(hj6hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"debug_object_activate (C function)c.debug_object_activatehNtauh1jhjhhhNhNubj)}(hhh](j)}(hKint debug_object_activate (void *addr, const struct debug_obj_descr *descr)h]j)}(hJint debug_object_activate(void *addr, const struct debug_obj_descr *descr)h](j)}(hinth]hint}(hhhj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWhhhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:114: ./lib/debugobjects.chMubj)}(h h]h }(hhhjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWhhhjihMubj)}(hdebug_object_activateh]j)}(hdebug_object_activateh]hdebug_object_activate}(hhhj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjxubah}(h]h ](jjeh"]h$]h&]jjuh1jhjWhhhjihMubj)}(h1(void *addr, const struct debug_obj_descr *descr)h](j!)}(h void *addrh](j)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjC)}(hjFh]h*}(hhhjhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhjubj)}(haddrh]haddr}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubj!)}(h#const struct debug_obj_descr *descrh](jm)}(hjph]hconst}(hhhjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hdebug_obj_descrh]hdebug_obj_descr}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jj~sbc.debug_object_activateasbuh1hhjubj)}(h h]h }(hhhj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjC)}(hjFh]h*}(hhhjAhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhjubj)}(hdescrh]hdescr}(hhhjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubeh}(h]h ]h"]h$]h&]jjuh1jhjWhhhjihMubeh}(h]h ]h"]h$]h&]jjjuh1jjjhjShhhjihMubah}(h]jNah ](jjeh"]h$]h&]juh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:114: ./lib/debugobjects.chMhjPhhubj)}(hhh]h)}(h(debug checks when an object is activatedh]h(debug checks when an object is activated}(hj{hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:114: ./lib/debugobjects.chMhjvhhubah}(h]h ]h"]h$]h&]uh1jhjPhhhjihMubeh}(h]h ](jfunctioneh"]h$]h&]j=jj>jj?jj@uh1jhhhjhNhNubjB)}(h**Parameters** ``void *addr`` address of the object ``const struct debug_obj_descr *descr`` pointer to an object specific debug description structure Returns 0 for success, -EINVAL for check failed.h](h)}(h**Parameters**h]jL)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jKhjubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:114: ./lib/debugobjects.chMhjubjb)}(hhh](jg)}(h%``void *addr`` address of the object h](jm)}(h``void *addr``h]js)}(hjh]h void *addr}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:114: ./lib/debugobjects.chMhjubj)}(hhh]h)}(haddress of the objecth]haddress of the object}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jfhjhMhjubjg)}(h``const struct debug_obj_descr *descr`` pointer to an object specific debug description structure Returns 0 for success, -EINVAL for check failed.h](jm)}(h'``const struct debug_obj_descr *descr``h]js)}(hjh]h#const struct debug_obj_descr *descr}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:114: ./lib/debugobjects.chMhjubj)}(hhh]h)}(hjpointer to an object specific debug description structure Returns 0 for success, -EINVAL for check failed.h]hjpointer to an object specific debug description structure Returns 0 for success, -EINVAL for check failed.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jfhj hMhjubeh}(h]h ]h"]h$]h&]uh1jahjubeh}(h]h ] kernelindentah"]h$]h&]uh1jAhjhhhNhNubh)}(hTThis function is called whenever the activation function of a real object is called.h]hTThis function is called whenever the activation function of a real object is called.}(hj5 hj3 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjhhubh)}(hXWhen the real object is already tracked by debugobjects it is checked, whether the object can be activated. Activating is not allowed for active and destroyed objects. When debugobjects detects an error, then it calls the fixup_activate function of the object type description structure if provided by the caller. The fixup function can correct the problem before the real activation of the object happens. E.g. it can deactivate an active object in order to prevent damage to the subsystem.h]hXWhen the real object is already tracked by debugobjects it is checked, whether the object can be activated. Activating is not allowed for active and destroyed objects. When debugobjects detects an error, then it calls the fixup_activate function of the object type description structure if provided by the caller. The fixup function can correct the problem before the real activation of the object happens. E.g. it can deactivate an active object in order to prevent damage to the subsystem.}(hjC hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjhhubh)}(hXcWhen the real object is not yet tracked by debugobjects then the fixup_activate function is called if available. This is necessary to allow the legitimate activation of statically allocated and initialized objects. The fixup function checks whether the object is valid and calls the debug_objects_init() function to initialize the tracking of this object.h]hXcWhen the real object is not yet tracked by debugobjects then the fixup_activate function is called if available. This is necessary to allow the legitimate activation of statically allocated and initialized objects. The fixup function checks whether the object is valid and calls the debug_objects_init() function to initialize the tracking of this object.}(hjQ hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hqWhen the activation is legitimate, then the state of the associated tracker object is set to ODEBUG_STATE_ACTIVE.h]hqWhen the activation is legitimate, then the state of the associated tracker object is set to ODEBUG_STATE_ACTIVE.}(hj_ hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$debug_object_deactivate (C function)c.debug_object_deactivatehNtauh1jhjhhhNhNubj)}(hhh](j)}(hNvoid debug_object_deactivate (void *addr, const struct debug_obj_descr *descr)h]j)}(hMvoid debug_object_deactivate(void *addr, const struct debug_obj_descr *descr)h](j)}(hvoidh]hvoid}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:139: ./lib/debugobjects.chMubj)}(h h]h }(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hMubj)}(hdebug_object_deactivateh]j)}(hdebug_object_deactivateh]hdebug_object_deactivate}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj hhhj hMubj)}(h1(void *addr, const struct debug_obj_descr *descr)h](j!)}(h void *addrh](j)}(hvoidh]hvoid}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjC)}(hjFh]h*}(hhhj hhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhj ubj)}(haddrh]haddr}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubj!)}(h#const struct debug_obj_descr *descrh](jm)}(hjph]hconst}(hhhj hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubj)}(h h]h }(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjm)}(hjh]hstruct}(hhhj hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubj)}(h h]h }(hhhj+ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]j)}(hdebug_obj_descrh]hdebug_obj_descr}(hhhj< hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj9 ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj> modnameN classnameNjj)}j]j)}jj sbc.debug_object_deactivateasbuh1hhj ubj)}(h h]h }(hhhj\ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjC)}(hjFh]h*}(hhhjj hhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhj ubj)}(hdescrh]hdescr}(hhhjw hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hMubeh}(h]h ]h"]h$]h&]jjjuh1jjjhj| hhhj hMubah}(h]jw ah ](jjeh"]h$]h&]juh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:139: ./lib/debugobjects.chMhjy hhubj)}(hhh]h)}(h*debug checks when an object is deactivatedh]h*debug checks when an object is deactivated}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:139: ./lib/debugobjects.chMhj hhubah}(h]h ]h"]h$]h&]uh1jhjy hhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]j=jj>j j?j j@uh1jhhhjhNhNubjB)}(h**Parameters** ``void *addr`` address of the object ``const struct debug_obj_descr *descr`` pointer to an object specific debug description structureh](h)}(h**Parameters**h]jL)}(hj h]h Parameters}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jKhj ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:139: ./lib/debugobjects.chMhj ubjb)}(hhh](jg)}(h%``void *addr`` address of the object h](jm)}(h``void *addr``h]js)}(hj h]h void *addr}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jrhj ubah}(h]h ]h"]h$]h&]uh1jlhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:139: ./lib/debugobjects.chMhj ubj)}(hhh]h)}(haddress of the objecth]haddress of the object}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jfhj hMhj ubjg)}(ha``const struct debug_obj_descr *descr`` pointer to an object specific debug description structureh](jm)}(h'``const struct debug_obj_descr *descr``h]js)}(hj h]h#const struct debug_obj_descr *descr}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jrhj ubah}(h]h ]h"]h$]h&]uh1jlhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:139: ./lib/debugobjects.chMhj ubj)}(hhh]h)}(h9pointer to an object specific debug description structureh]h9pointer to an object specific debug description structure}(hj7 hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:139: ./lib/debugobjects.chMhj2 ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jfhj1 hMhj ubeh}(h]h ]h"]h$]h&]uh1jahj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jAhjhhhNhNubh)}(hVThis function is called whenever the deactivation function of a real object is called.h]hVThis function is called whenever the deactivation function of a real object is called.}(hj_ hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hWhen the real object is tracked by debugobjects it is checked, whether the object can be deactivated. Deactivating is not allowed for untracked or destroyed objects.h]hWhen the real object is tracked by debugobjects it is checked, whether the object can be deactivated. Deactivating is not allowed for untracked or destroyed objects.}(hjm hjk hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(huWhen the deactivation is legitimate, then the state of the associated tracker object is set to ODEBUG_STATE_INACTIVE.h]huWhen the deactivation is legitimate, then the state of the associated tracker object is set to ODEBUG_STATE_INACTIVE.}(hj{ hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!debug_object_destroy (C function)c.debug_object_destroyhNtauh1jhjhhhNhNubj)}(hhh](j)}(hKvoid debug_object_destroy (void *addr, const struct debug_obj_descr *descr)h]j)}(hJvoid debug_object_destroy(void *addr, const struct debug_obj_descr *descr)h](j)}(hvoidh]hvoid}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:152: ./lib/debugobjects.chMubj)}(h h]h }(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hMubj)}(hdebug_object_destroyh]j)}(hdebug_object_destroyh]hdebug_object_destroy}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj hhhj hMubj)}(h1(void *addr, const struct debug_obj_descr *descr)h](j!)}(h void *addrh](j)}(hvoidh]hvoid}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjC)}(hjFh]h*}(hhhj hhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhj ubj)}(haddrh]haddr}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubj!)}(h#const struct debug_obj_descr *descrh](jm)}(hjph]hconst}(hhhj hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubj)}(h h]h }(hhhj, hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjm)}(hjh]hstruct}(hhhj: hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubj)}(h h]h }(hhhjG hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]j)}(hdebug_obj_descrh]hdebug_obj_descr}(hhhjX hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjU ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjZ modnameN classnameNjj)}j]j)}jj sbc.debug_object_destroyasbuh1hhj ubj)}(h h]h }(hhhjx hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjC)}(hjFh]h*}(hhhj hhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhj ubj)}(hdescrh]hdescr}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hMubeh}(h]h ]h"]h$]h&]jjjuh1jjjhj hhhj hMubah}(h]j ah ](jjeh"]h$]h&]juh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:152: ./lib/debugobjects.chMhj hhubj)}(hhh]h)}(h(debug checks when an object is destroyedh]h(debug checks when an object is destroyed}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:152: ./lib/debugobjects.chMhj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]j=jj>j j?j j@uh1jhhhjhNhNubjB)}(h**Parameters** ``void *addr`` address of the object ``const struct debug_obj_descr *descr`` pointer to an object specific debug description structureh](h)}(h**Parameters**h]jL)}(hj h]h Parameters}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jKhj ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:152: ./lib/debugobjects.chMhj ubjb)}(hhh](jg)}(h%``void *addr`` address of the object h](jm)}(h``void *addr``h]js)}(hj h]h void *addr}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jrhj ubah}(h]h ]h"]h$]h&]uh1jlhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:152: ./lib/debugobjects.chMhj ubj)}(hhh]h)}(haddress of the objecth]haddress of the object}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jfhj hMhj ubjg)}(ha``const struct debug_obj_descr *descr`` pointer to an object specific debug description structureh](jm)}(h'``const struct debug_obj_descr *descr``h]js)}(hj8 h]h#const struct debug_obj_descr *descr}(hhhj: hhhNhNubah}(h]h ]h"]h$]h&]uh1jrhj6 ubah}(h]h ]h"]h$]h&]uh1jlhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:152: ./lib/debugobjects.chMhj2 ubj)}(hhh]h)}(h9pointer to an object specific debug description structureh]h9pointer to an object specific debug description structure}(hjS hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:152: ./lib/debugobjects.chMhjN ubah}(h]h ]h"]h$]h&]uh1jhj2 ubeh}(h]h ]h"]h$]h&]uh1jfhjM hMhj ubeh}(h]h ]h"]h$]h&]uh1jahj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jAhjhhhNhNubh)}(hThis function is called to mark an object destroyed. This is useful to prevent the usage of invalid objects, which are still available in memory: either statically allocated objects or objects which are freed later.h]hThis function is called to mark an object destroyed. This is useful to prevent the usage of invalid objects, which are still available in memory: either statically allocated objects or objects which are freed later.}(hj{ hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXWhen the real object is tracked by debugobjects it is checked, whether the object can be destroyed. Destruction is not allowed for active and destroyed objects. When debugobjects detects an error, then it calls the fixup_destroy function of the object type description structure if provided by the caller. The fixup function can correct the problem before the real destruction of the object happens. E.g. it can deactivate an active object in order to prevent damage to the subsystem.h]hXWhen the real object is tracked by debugobjects it is checked, whether the object can be destroyed. Destruction is not allowed for active and destroyed objects. When debugobjects detects an error, then it calls the fixup_destroy function of the object type description structure if provided by the caller. The fixup function can correct the problem before the real destruction of the object happens. E.g. it can deactivate an active object in order to prevent damage to the subsystem.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(huWhen the destruction is legitimate, then the state of the associated tracker object is set to ODEBUG_STATE_DESTROYED.h]huWhen the destruction is legitimate, then the state of the associated tracker object is set to ODEBUG_STATE_DESTROYED.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdebug_object_free (C function)c.debug_object_freehNtauh1jhjhhhNhNubj)}(hhh](j)}(hHvoid debug_object_free (void *addr, const struct debug_obj_descr *descr)h]j)}(hGvoid debug_object_free(void *addr, const struct debug_obj_descr *descr)h](j)}(hvoidh]hvoid}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:171: ./lib/debugobjects.chMFubj)}(h h]h }(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hMFubj)}(hdebug_object_freeh]j)}(hdebug_object_freeh]hdebug_object_free}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj hhhj hMFubj)}(h1(void *addr, const struct debug_obj_descr *descr)h](j!)}(h void *addrh](j)}(hvoidh]hvoid}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjC)}(hjFh]h*}(hhhjhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhj ubj)}(haddrh]haddr}(hhhj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubj!)}(h#const struct debug_obj_descr *descrh](jm)}(hjph]hconst}(hhhj;hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj7ubj)}(h h]h }(hhhjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubjm)}(hjh]hstruct}(hhhjVhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj7ubj)}(h h]h }(hhhjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubh)}(hhh]j)}(hdebug_obj_descrh]hdebug_obj_descr}(hhhjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjvmodnameN classnameNjj)}j]j)}jj sbc.debug_object_freeasbuh1hhj7ubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubjC)}(hjFh]h*}(hhhjhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhj7ubj)}(hdescrh]hdescr}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hMFubeh}(h]h ]h"]h$]h&]jjjuh1jjjhj hhhj hMFubah}(h]j ah ](jjeh"]h$]h&]juh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:171: ./lib/debugobjects.chMIhj hhubj)}(hhh]h)}(h$debug checks when an object is freedh]h$debug checks when an object is freed}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:171: ./lib/debugobjects.chMEhjhhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hMFubeh}(h]h ](jfunctioneh"]h$]h&]j=jj>jj?jj@uh1jhhhjhNhNubjB)}(h**Parameters** ``void *addr`` address of the object ``const struct debug_obj_descr *descr`` pointer to an object specific debug description structureh](h)}(h**Parameters**h]jL)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jKhjubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:171: ./lib/debugobjects.chMIhjubjb)}(hhh](jg)}(h%``void *addr`` address of the object h](jm)}(h``void *addr``h]js)}(hjh]h void *addr}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:171: ./lib/debugobjects.chMFhjubj)}(hhh]h)}(haddress of the objecth]haddress of the object}(hj6hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMFhj1ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jfhj0hMFhjubjg)}(ha``const struct debug_obj_descr *descr`` pointer to an object specific debug description structureh](jm)}(h'``const struct debug_obj_descr *descr``h]js)}(hjTh]h#const struct debug_obj_descr *descr}(hhhjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjRubah}(h]h ]h"]h$]h&]uh1jlhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:171: ./lib/debugobjects.chMHhjNubj)}(hhh]h)}(h9pointer to an object specific debug description structureh]h9pointer to an object specific debug description structure}(hjohjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:171: ./lib/debugobjects.chMGhjjubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jfhjihMHhjubeh}(h]h ]h"]h$]h&]uh1jahjubeh}(h]h ] kernelindentah"]h$]h&]uh1jAhjhhhNhNubh)}(h2This function is called before an object is freed.h]h2This function is called before an object is freed.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXWhen the real object is tracked by debugobjects it is checked, whether the object can be freed. Free is not allowed for active objects. When debugobjects detects an error, then it calls the fixup_free function of the object type description structure if provided by the caller. The fixup function can correct the problem before the real free of the object happens. E.g. it can deactivate an active object in order to prevent damage to the subsystem.h]hXWhen the real object is tracked by debugobjects it is checked, whether the object can be freed. Free is not allowed for active objects. When debugobjects detects an error, then it calls the fixup_free function of the object type description structure if provided by the caller. The fixup function can correct the problem before the real free of the object happens. E.g. it can deactivate an active object in order to prevent damage to the subsystem.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hNote that debug_object_free removes the object from the tracker. Later usage of the object is detected by the other debug checks.h]hNote that debug_object_free removes the object from the tracker. Later usage of the object is detected by the other debug checks.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%debug_object_assert_init (C function)c.debug_object_assert_inithNtauh1jhjhhhNhNubj)}(hhh](j)}(hOvoid debug_object_assert_init (void *addr, const struct debug_obj_descr *descr)h]j)}(hNvoid debug_object_assert_init(void *addr, const struct debug_obj_descr *descr)h](j)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:188: ./lib/debugobjects.chMpubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMpubj)}(hdebug_object_assert_inith]j)}(hdebug_object_assert_inith]hdebug_object_assert_init}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhMpubj)}(h1(void *addr, const struct debug_obj_descr *descr)h](j!)}(h void *addrh](j)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hhhj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjC)}(hjFh]h*}(hhhj1hhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhjubj)}(haddrh]haddr}(hhhj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubj!)}(h#const struct debug_obj_descr *descrh](jm)}(hjph]hconst}(hhhjWhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjSubj)}(h h]h }(hhhjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubjm)}(hjh]hstruct}(hhhjrhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjSubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubh)}(hhh]j)}(hdebug_obj_descrh]hdebug_obj_descr}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.debug_object_assert_initasbuh1hhjSubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubjC)}(hjFh]h*}(hhhjhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhjSubj)}(hdescrh]hdescr}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMpubeh}(h]h ]h"]h$]h&]jjjuh1jjjhjhhhjhMpubah}(h]jah ](jjeh"]h$]h&]juh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:188: ./lib/debugobjects.chMshjhhubj)}(hhh]h)}(h*debug checks when object should be init-edh]h*debug checks when object should be init-ed}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:188: ./lib/debugobjects.chMohjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMpubeh}(h]h ](jfunctioneh"]h$]h&]j=jj>jj?jj@uh1jhhhjhNhNubjB)}(h**Parameters** ``void *addr`` address of the object ``const struct debug_obj_descr *descr`` pointer to an object specific debug description structureh](h)}(h**Parameters**h]jL)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jKhjubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:188: ./lib/debugobjects.chMshjubjb)}(hhh](jg)}(h%``void *addr`` address of the object h](jm)}(h``void *addr``h]js)}(hj7h]h void *addr}(hhhj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jrhj5ubah}(h]h ]h"]h$]h&]uh1jlhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:188: ./lib/debugobjects.chMphj1ubj)}(hhh]h)}(haddress of the objecth]haddress of the object}(hjRhjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhMphjMubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jfhjLhMphj.ubjg)}(ha``const struct debug_obj_descr *descr`` pointer to an object specific debug description structureh](jm)}(h'``const struct debug_obj_descr *descr``h]js)}(hjph]h#const struct debug_obj_descr *descr}(hhhjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjnubah}(h]h ]h"]h$]h&]uh1jlhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:188: ./lib/debugobjects.chMrhjjubj)}(hhh]h)}(h9pointer to an object specific debug description structureh]h9pointer to an object specific debug description structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:188: ./lib/debugobjects.chMqhjubah}(h]h ]h"]h$]h&]uh1jhjjubeh}(h]h ]h"]h$]h&]uh1jfhjhMrhj.ubeh}(h]h ]h"]h$]h&]uh1jahjubeh}(h]h ] kernelindentah"]h$]h&]uh1jAhjhhhNhNubh)}(hFThis function is called to assert that an object has been initialized.h]hFThis function is called to assert that an object has been initialized.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX9When the real object is not tracked by debugobjects, it calls fixup_assert_init of the object type description structure provided by the caller, with the hardcoded object state ODEBUG_NOT_AVAILABLE. The fixup function can correct the problem by calling debug_object_init and other specific initializing functions.h]hX9When the real object is not tracked by debugobjects, it calls fixup_assert_init of the object type description structure provided by the caller, with the hardcoded object state ODEBUG_NOT_AVAILABLE. The fixup function can correct the problem by calling debug_object_init and other specific initializing functions.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hFWhen the real object is already tracked by debugobjects it is ignored.h]hFWhen the real object is already tracked by debugobjects it is ignored.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]debug-functionsah ]h"]debug functionsah$]h&]uh1hhhhhhhhKAubh)}(hhh](h)}(hFixup functionsh]hFixup functions}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h'Debug object type description structureh]h'Debug object type description structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdebug_obj (C struct) c.debug_objhNtauh1jhjhhhNhNubj)}(hhh](j)}(h debug_objh]j)}(hstruct debug_objh](jm)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjhhhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhKubj)}(h h]h }(hhhj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj+hKubj)}(h debug_objh]j)}(hjh]h debug_obj}(hhhj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhj+hKubeh}(h]h ]h"]h$]h&]jjjuh1jjjhjhhhj+hKubah}(h]jah ](jjeh"]h$]h&]juh1jhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhKhjhhubj)}(hhh]h)}(h#representation of an tracked objecth]h#representation of an tracked object}(hjchjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhKhj^hhubah}(h]h ]h"]h$]h&]uh1jhjhhhj+hKubeh}(h]h ](jstructeh"]h$]h&]j=jj>jyj?jyj@uh1jhhhjhNhNubjB)}(hX**Definition**:: struct debug_obj { struct hlist_node node; enum debug_obj_state state; unsigned int astate; void *object; const struct debug_obj_descr *descr; }; **Members** ``node`` hlist node to link the object into the tracker list ``state`` tracked object state ``astate`` current active state ``object`` pointer to the real object ``descr`` pointer to an object type specific debug description structureh](h)}(h**Definition**::h](jLu)}(h**Definition**h]h Definition}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jKhjubh:}(h:hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhKhj}ubh literal_block)}(hstruct debug_obj { struct hlist_node node; enum debug_obj_state state; unsigned int astate; void *object; const struct debug_obj_descr *descr; };h]hstruct debug_obj { struct hlist_node node; enum debug_obj_state state; unsigned int astate; void *object; const struct debug_obj_descr *descr; };}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhKhj}ubh)}(h **Members**h]jL)}(hjh]hMembers}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jKhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK#hj}ubjb)}(hhh](jg)}(h=``node`` hlist node to link the object into the tracker list h](jm)}(h``node``h]js)}(hjh]hnode}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhKhjubj)}(hhh]h)}(h3hlist node to link the object into the tracker listh]h3hlist node to link the object into the tracker list}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jfhjhKhjubjg)}(h``state`` tracked object state h](jm)}(h ``state``h]js)}(hj h]hstate}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhKhjubj)}(hhh]h)}(htracked object stateh]htracked object state}(hj%hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jfhjhKhjubjg)}(h ``astate`` current active state h](jm)}(h ``astate``h]js)}(hjCh]hastate}(hhhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjAubah}(h]h ]h"]h$]h&]uh1jlhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhKhj=ubj)}(hhh]h)}(hcurrent active stateh]hcurrent active state}(hj^hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhKhjYubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]uh1jfhjXhKhjubjg)}(h&``object`` pointer to the real object h](jm)}(h ``object``h]js)}(hj|h]hobject}(hhhj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjzubah}(h]h ]h"]h$]h&]uh1jlhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhKhjvubj)}(hhh]h)}(hpointer to the real objecth]hpointer to the real object}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]uh1jfhjhKhjubjg)}(hH``descr`` pointer to an object type specific debug description structureh](jm)}(h ``descr``h]js)}(hjh]hdescr}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhKhjubj)}(hhh]h)}(h>pointer to an object type specific debug description structureh]h>pointer to an object type specific debug description structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jfhjhKhjubeh}(h]h ]h"]h$]h&]uh1jahj}ubeh}(h]h ] kernelindentah"]h$]h&]uh1jAhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdebug_obj_descr (C struct)c.debug_obj_descrhNtauh1jhjhhhNhNubj)}(hhh](j)}(hdebug_obj_descrh]j)}(hstruct debug_obj_descrh](jm)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj hhhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK&ubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhjhK&ubj)}(hdebug_obj_descrh]j)}(hj h]hdebug_obj_descr}(hhhj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj+ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj hhhjhK&ubeh}(h]h ]h"]h$]h&]jjjuh1jjjhjhhhjhK&ubah}(h]jah ](jjeh"]h$]h&]juh1jhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK!hjhhubj)}(hhh]h)}(h0object type specific debug description structureh]h0object type specific debug description structure}(hjThjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK%hjOhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhK&ubeh}(h]h ](jstructeh"]h$]h&]j=jj>jjj?jjj@uh1jhhhjhNhNubjB)}(hX**Definition**:: struct debug_obj_descr { const char *name; void *(*debug_hint)(void *addr); bool (*is_static_object)(void *addr); bool (*fixup_init)(void *addr, enum debug_obj_state state); bool (*fixup_activate)(void *addr, enum debug_obj_state state); bool (*fixup_destroy)(void *addr, enum debug_obj_state state); bool (*fixup_free)(void *addr, enum debug_obj_state state); bool (*fixup_assert_init)(void *addr, enum debug_obj_state state); }; **Members** ``name`` name of the object typee ``debug_hint`` function returning address, which have associated kernel symbol, to allow identify the object ``is_static_object`` return true if the obj is static, otherwise return false ``fixup_init`` fixup function, which is called when the init check fails. All fixup functions must return true if fixup was successful, otherwise return false ``fixup_activate`` fixup function, which is called when the activate check fails ``fixup_destroy`` fixup function, which is called when the destroy check fails ``fixup_free`` fixup function, which is called when the free check fails ``fixup_assert_init`` fixup function, which is called when the assert_init check failsh](h)}(h**Definition**::h](jL)}(h**Definition**h]h Definition}(hhhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jKhjrubh:}(hjhjrhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK)hjnubj)}(hXstruct debug_obj_descr { const char *name; void *(*debug_hint)(void *addr); bool (*is_static_object)(void *addr); bool (*fixup_init)(void *addr, enum debug_obj_state state); bool (*fixup_activate)(void *addr, enum debug_obj_state state); bool (*fixup_destroy)(void *addr, enum debug_obj_state state); bool (*fixup_free)(void *addr, enum debug_obj_state state); bool (*fixup_assert_init)(void *addr, enum debug_obj_state state); };h]hXstruct debug_obj_descr { const char *name; void *(*debug_hint)(void *addr); bool (*is_static_object)(void *addr); bool (*fixup_init)(void *addr, enum debug_obj_state state); bool (*fixup_activate)(void *addr, enum debug_obj_state state); bool (*fixup_destroy)(void *addr, enum debug_obj_state state); bool (*fixup_free)(void *addr, enum debug_obj_state state); bool (*fixup_assert_init)(void *addr, enum debug_obj_state state); };}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK+hjnubh)}(h **Members**h]jL)}(hjh]hMembers}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jKhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK6hjnubjb)}(hhh](jg)}(h"``name`` name of the object typee h](jm)}(h``name``h]js)}(hjh]hname}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK(hjubj)}(hhh]h)}(hname of the object typeeh]hname of the object typee}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK(hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jfhjhK(hjubjg)}(hm``debug_hint`` function returning address, which have associated kernel symbol, to allow identify the object h](jm)}(h``debug_hint``h]js)}(hjh]h debug_hint}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK*hjubj)}(hhh]h)}(h]function returning address, which have associated kernel symbol, to allow identify the objecth]h]function returning address, which have associated kernel symbol, to allow identify the object}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK)hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jfhj hK*hjubjg)}(hN``is_static_object`` return true if the obj is static, otherwise return false h](jm)}(h``is_static_object``h]js)}(hj2h]his_static_object}(hhhj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jrhj0ubah}(h]h ]h"]h$]h&]uh1jlhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK+hj,ubj)}(hhh]h)}(h8return true if the obj is static, otherwise return falseh]h8return true if the obj is static, otherwise return false}(hjMhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhK+hjHubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jfhjGhK+hjubjg)}(h``fixup_init`` fixup function, which is called when the init check fails. All fixup functions must return true if fixup was successful, otherwise return false h](jm)}(h``fixup_init``h]js)}(hjkh]h fixup_init}(hhhjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjiubah}(h]h ]h"]h$]h&]uh1jlhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK.hjeubj)}(hhh]h)}(hfixup function, which is called when the init check fails. All fixup functions must return true if fixup was successful, otherwise return falseh]hfixup function, which is called when the init check fails. All fixup functions must return true if fixup was successful, otherwise return false}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK,hjubah}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]uh1jfhjhK.hjubjg)}(hQ``fixup_activate`` fixup function, which is called when the activate check fails h](jm)}(h``fixup_activate``h]js)}(hjh]hfixup_activate}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK0hjubj)}(hhh]h)}(h=fixup function, which is called when the activate check failsh]h=fixup function, which is called when the activate check fails}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK/hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jfhjhK0hjubjg)}(hO``fixup_destroy`` fixup function, which is called when the destroy check fails h](jm)}(h``fixup_destroy``h]js)}(hjh]h fixup_destroy}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jlhd/var/lib/git/docbuild/linux/Documentation/core-api/debug-objects:207: ./include/linux/debugobjects.hhK2hjubj)}(hhh]h)}(h