Skip to content

Commit 76d5d4c

Browse files
guoweikangakpm00
authored andcommitted
mm/kmemleak: fix percpu memory leak detection failure
kmemleak_alloc_percpu gives an incorrect min_count parameter, causing percpu memory to be considered a gray object. Link: https://lkml.kernel.org/r/[email protected] Fixes: 8c86859 ("mm/kmemleak: use IS_ERR_PCPU() for pointer in the percpu address space") Signed-off-by: Guo Weikang <[email protected]> Acked-by: Uros Bizjak <[email protected]> Acked-by: Catalin Marinas <[email protected]> Cc: Guo Weikang <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent cd6313b commit 76d5d4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/kmemleak.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ void __ref kmemleak_alloc_percpu(const void __percpu *ptr, size_t size,
10931093
pr_debug("%s(0x%px, %zu)\n", __func__, ptr, size);
10941094

10951095
if (kmemleak_enabled && ptr && !IS_ERR_PCPU(ptr))
1096-
create_object_percpu((__force unsigned long)ptr, size, 0, gfp);
1096+
create_object_percpu((__force unsigned long)ptr, size, 1, gfp);
10971097
}
10981098
EXPORT_SYMBOL_GPL(kmemleak_alloc_percpu);
10991099

0 commit comments

Comments
 (0)