diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2014-06-06 17:38:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:08:17 -0400 |
commit | aedf95ea0583676cd7bfa395681ad744791a433e (patch) | |
tree | ec6157cd2cd37203373c4e1c8ccf93906ceed7f0 /mm/nobootmem.c | |
parent | 174119628188b085c66fe7d86fbfb4cccb1bd864 (diff) |
mm/memblock.c: call kmemleak directly from memblock_(alloc|free)
Kmemleak could ignore memory blocks allocated via memblock_alloc()
leading to false positives during scanning. This patch adds the
corresponding callbacks and removes kmemleak_free_* calls in
mm/nobootmem.c to avoid duplication.
The kmemleak_alloc() in mm/nobootmem.c is kept since
__alloc_memory_core_early() does not use memblock_alloc() directly.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/nobootmem.c')
-rw-r--r-- | mm/nobootmem.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/mm/nobootmem.c b/mm/nobootmem.c index 04a9d94333a5..7ed58602e71b 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c | |||
@@ -197,7 +197,6 @@ unsigned long __init free_all_bootmem(void) | |||
197 | void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, | 197 | void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, |
198 | unsigned long size) | 198 | unsigned long size) |
199 | { | 199 | { |
200 | kmemleak_free_part(__va(physaddr), size); | ||
201 | memblock_free(physaddr, size); | 200 | memblock_free(physaddr, size); |
202 | } | 201 | } |
203 | 202 | ||
@@ -212,7 +211,6 @@ void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, | |||
212 | */ | 211 | */ |
213 | void __init free_bootmem(unsigned long addr, unsigned long size) | 212 | void __init free_bootmem(unsigned long addr, unsigned long size) |
214 | { | 213 | { |
215 | kmemleak_free_part(__va(addr), size); | ||
216 | memblock_free(addr, size); | 214 | memblock_free(addr, size); |
217 | } | 215 | } |
218 | 216 | ||