Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 100d13c3 authored by Catalin Marinas's avatar Catalin Marinas Committed by Tejun Heo
Browse files

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: default avatarSami Liedes <sami.liedes@iki.fi>
Cc: Tejun Heo <tj@kernel.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 42b64281
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;