summaryrefslogtreecommitdiff
path: root/mm/slab_common.c
diff options
context:
space:
mode:
authorSuren Baghdasaryan <surenb@google.com>2022-12-14 02:45:17 +0000
committerSuren Baghdasaryan <surenb@google.com>2024-02-11 10:45:55 -0800
commit3ab9e6a75308b9ba298489ba5294d34cf7baf10d (patch)
treeecb39b779a16af834cb1e616b209569140653c53 /mm/slab_common.c
parent662aa876383c37e50dfa716a5e5791d70fcac74e (diff)
codetag: debug: skip objext checking when it's for objext itself
objext objects are created with __GFP_NO_OBJ_EXT flag and therefore have no corresponding objext themselves (otherwise we would get an infinite recursion). When freeing these objects their codetag will be empty and when CONFIG_MEM_ALLOC_PROFILING_DEBUG is enabled this will lead to false warnings. Introduce CODETAG_EMPTY special codetag value to mark allocations which intentionally lack codetag to avoid these warnings. Set objext codetags to CODETAG_EMPTY before freeing to indicate that the codetag is expected to be empty. Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r--mm/slab_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 21b0b9e9cd9e..d5f75d04ced2 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -242,6 +242,7 @@ int alloc_slab_obj_exts(struct slab *slab, struct kmem_cache *s,
* assign slabobj_exts in parallel. In this case the existing
* objcg vector should be reused.
*/
+ mark_objexts_empty(vec);
kfree(vec);
return 0;
}