Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Convert the statically allocated objects to dynamic ones:

Proto:static int __init debug_objects_replace_static_objects(void)

Type:int

Parameter:Nothing

1297  db = obj_hash
1301  cnt = 0
1303  When i < ODEBUG_POOL_SIZE cycle
1304  obj = Shortcuts
1305  If Not obj Then Go to free
1307  hlist_add_head( & node, & objects)
1317  hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry*@pos: the type * to use as a loop cursor.*@n: another &struct hlist_node to use as temporary storage*@head: the head for your list.(obj, tmp, & obj_pool, node)
1318  hlist_del( & node)
1320  Move a list from one list head to another. Fixup the pprev* reference of the first entry if it exists.
1323  When i < ODEBUG_HASH_SIZE cycle
1324  Move a list from one list head to another. Fixup the pprev* reference of the first entry if it exists.
1327  new = hlist_entry(first, typeof( * obj), node)
1328  hlist_del( & node)
1330  new = obj
1331  hlist_add_head( & node, & list)
1332  cnt++
1336  pr_debug("%d of %d active objects replaced\n", cnt, obj_pool_used)
1338  Return 0
1339  free :
1341  hlist_del( & node)
1342  kmem_cache_free(obj_cache, obj)
1344  Return -ENOMEM
Caller
NameDescribe
debug_objects_mem_initCalled after the kmem_caches are functional to setup a dedicated* cache pool, which has the SLAB_DEBUG_OBJECTS flag set. This flag* prevents that the debug code is called on kmem_cache_free() for the* debug tracker objects to avoid recursive calls.