aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2012-05-09 16:55:19 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-21 10:46:19 -0700
commit9b5707862c86f98190c900770ce3ce5ad89dd4bd (patch)
treea9d1f45ef0dc1abf4ecb5e575e2e8fe85d06fcd3
parentc93fc7ebf9357371b32e2cd3c4b44a3693296136 (diff)
kmemleak: Fix the kmemleak tracking of the percpu areas with !SMP
commit 100d13c3b5b9410f604b86f5e0a34da64b8cf659 upstream. 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 <sami.liedes@iki.fi> Cc: Tejun Heo <tj@kernel.org> Cc: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--mm/percpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/percpu.c b/mm/percpu.c
index 79756932362..317de237f68 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;