Skip to content

Commit

Permalink
kmemleak: Fix the kmemleak tracking of the percpu areas with !SMP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ctmarinas authored and htejun committed May 9, 2012
1 parent 42b6428 commit 100d13c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mm/percpu.c
Expand Up @@ -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;
Expand Down

0 comments on commit 100d13c

Please sign in to comment.