6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guo Weikang guoweikang.kernel@gmail.com
commit 76d5d4c53e68719c018691b19a961e78524a155c upstream.
kmemleak_alloc_percpu gives an incorrect min_count parameter, causing percpu memory to be considered a gray object.
Link: https://lkml.kernel.org/r/20241227092311.3572500-1-guoweikang.kernel@gmail.c... Fixes: 8c8685928910 ("mm/kmemleak: use IS_ERR_PCPU() for pointer in the percpu address space") Signed-off-by: Guo Weikang guoweikang.kernel@gmail.com Acked-by: Uros Bizjak ubizjak@gmail.com Acked-by: Catalin Marinas catalin.marinas@arm.com Cc: Guo Weikang guoweikang.kernel@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Andrew Morton akpm@linux-foundation.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1071,7 +1071,7 @@ void __ref kmemleak_alloc_percpu(const v pr_debug("%s(0x%px, %zu)\n", __func__, ptr, size);
if (kmemleak_enabled && ptr && !IS_ERR_PCPU(ptr)) - create_object_percpu((__force unsigned long)ptr, size, 0, gfp); + create_object_percpu((__force unsigned long)ptr, size, 1, gfp); } EXPORT_SYMBOL_GPL(kmemleak_alloc_percpu);