diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2009-08-27 15:29:17 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2009-08-27 15:29:17 +0200 |
commit | 008139d9146f9afee0e58df4b7422d0c9921f8ce (patch) | |
tree | 8c9259521435afe264ce3479ba696b00848c7b3e /mm/bootmem.c | |
parent | kmemleak: Save the stack trace for early allocations (diff) | |
download | linux-008139d9146f9afee0e58df4b7422d0c9921f8ce.tar.xz linux-008139d9146f9afee0e58df4b7422d0c9921f8ce.zip |
kmemleak: Do not report alloc_bootmem blocks as leaks
This patch sets the min_count for alloc_bootmem objects to 0 so that
they are never reported as leaks. This is because many of these blocks
are only referred via the physical address which is not looked up by
kmemleak.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm/bootmem.c')
-rw-r--r-- | mm/bootmem.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c index 701740c9e81b..555d5d2731c6 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -521,7 +521,11 @@ find_block: region = phys_to_virt(PFN_PHYS(bdata->node_min_pfn) + start_off); memset(region, 0, size); - kmemleak_alloc(region, size, 1, 0); + /* + * The min_count is set to 0 so that bootmem allocated blocks + * are never reported as leaks. + */ + kmemleak_alloc(region, size, 0, 0); return region; } |