+2
−2
+23
−10
Loading
alloc_empty_sheaf() allocates sheaves from SLAB_KMALLOC caches using __GFP_NO_OBJ_EXT to avoid recursion, however it does not mark their allocation tags empty before freeing, which results in a warning when CONFIG_MEM_ALLOC_PROFILING_DEBUG is set. Fix this by marking allocation tags for such sheaves as empty. The problem was technically introduced in commit 4c0a17e2 but only becomes possible to hit with commit 913ffd3a. Fixes: 4c0a17e2 ("slab: prevent recursive kmalloc() in alloc_empty_sheaf()") Fixes: 913ffd3a ("slab: handle kmalloc sheaves bootstrap") Reported-by:David Wang <00107082@163.com> Closes: https://lore.kernel.org/all/20260223155128.3849-1-00107082@163.com/ Analyzed-by:
Harry Yoo <harry.yoo@oracle.com> Signed-off-by:
Suren Baghdasaryan <surenb@google.com> Reviewed-by:
Harry Yoo <harry.yoo@oracle.com> Tested-by:
Harry Yoo <harry.yoo@oracle.com> Tested-by:
David Wang <00107082@163.com> Link: https://patch.msgid.link/20260225163407.2218712-1-surenb@google.com Signed-off-by:
Vlastimil Babka (SUSE) <vbabka@kernel.org>