From: Catalin Marinas Date: Wed, 9 May 2012 15:55:19 +0000 (+0100) Subject: kmemleak: Fix the kmemleak tracking of the percpu areas with !SMP X-Git-Tag: firefly_0821_release~3680^2~2923^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=100d13c3b5b9410f604b86f5e0a34da64b8cf659;p=firefly-linux-kernel-4.4.55.git kmemleak: Fix the kmemleak tracking of the percpu areas with !SMP Kmemleak tracks the percpu allocations via a specific API and the originally allocated areas must be removed from kmemleak (via kmemleak_free). The code was already doing this for SMP systems. Reported-by: Sami Liedes Cc: Tejun Heo Cc: Christoph Lameter Signed-off-by: Catalin Marinas Signed-off-by: Tejun Heo --- diff --git a/mm/percpu.c b/mm/percpu.c index ac5c626b44a9..bb4be7435ce3 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1895,6 +1895,8 @@ void __init setup_per_cpu_areas(void) fc = __alloc_bootmem(unit_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); if (!ai || !fc) panic("Failed to allocate memory for percpu areas."); + /* kmemleak tracks the percpu allocations separately */ + kmemleak_free(fc); ai->dyn_size = unit_size; ai->unit_size = unit_size;