Commit 100d13c3b5b9410f604b86f5e0a34da64b8cf659

Authored by Catalin Marinas
Committed by Tejun Heo
1 parent 42b6428145

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 <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>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

... ... @@ -1895,6 +1895,8 @@
1895 1895 fc = __alloc_bootmem(unit_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS));
1896 1896 if (!ai || !fc)
1897 1897 panic("Failed to allocate memory for percpu areas.");
  1898 + /* kmemleak tracks the percpu allocations separately */
  1899 + kmemleak_free(fc);
1898 1900  
1899 1901 ai->dyn_size = unit_size;
1900 1902 ai->unit_size = unit_size;