diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2012-05-09 11:55:19 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-05-09 13:13:29 -0400 |
commit | 100d13c3b5b9410f604b86f5e0a34da64b8cf659 (patch) | |
tree | d28702d0290cd2da7e443d798baab10ac831c4fe /mm/percpu.c | |
parent | 42b64281453249dac52861f9b97d18552a7ec62b (diff) |
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>
Diffstat (limited to 'mm/percpu.c')
-rw-r--r-- | mm/percpu.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) | |||
1895 | fc = __alloc_bootmem(unit_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); | 1895 | fc = __alloc_bootmem(unit_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); |
1896 | if (!ai || !fc) | 1896 | if (!ai || !fc) |
1897 | panic("Failed to allocate memory for percpu areas."); | 1897 | panic("Failed to allocate memory for percpu areas."); |
1898 | /* kmemleak tracks the percpu allocations separately */ | ||
1899 | kmemleak_free(fc); | ||
1898 | 1900 | ||
1899 | ai->dyn_size = unit_size; | 1901 | ai->dyn_size = unit_size; |
1900 | ai->unit_size = unit_size; | 1902 | ai->unit_size = unit_size; |