diff options
| -rw-r--r-- | mm/bootmem.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c index d2a9ce952768..701740c9e81b 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/pfn.h> | 12 | #include <linux/pfn.h> |
| 13 | #include <linux/bootmem.h> | 13 | #include <linux/bootmem.h> |
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <linux/kmemleak.h> | ||
| 15 | 16 | ||
| 16 | #include <asm/bug.h> | 17 | #include <asm/bug.h> |
| 17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
| @@ -335,6 +336,8 @@ void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, | |||
| 335 | { | 336 | { |
| 336 | unsigned long start, end; | 337 | unsigned long start, end; |
| 337 | 338 | ||
| 339 | kmemleak_free_part(__va(physaddr), size); | ||
| 340 | |||
| 338 | start = PFN_UP(physaddr); | 341 | start = PFN_UP(physaddr); |
| 339 | end = PFN_DOWN(physaddr + size); | 342 | end = PFN_DOWN(physaddr + size); |
| 340 | 343 | ||
| @@ -354,6 +357,8 @@ void __init free_bootmem(unsigned long addr, unsigned long size) | |||
| 354 | { | 357 | { |
| 355 | unsigned long start, end; | 358 | unsigned long start, end; |
| 356 | 359 | ||
| 360 | kmemleak_free_part(__va(addr), size); | ||
| 361 | |||
| 357 | start = PFN_UP(addr); | 362 | start = PFN_UP(addr); |
| 358 | end = PFN_DOWN(addr + size); | 363 | end = PFN_DOWN(addr + size); |
| 359 | 364 | ||
| @@ -516,6 +521,7 @@ find_block: | |||
| 516 | region = phys_to_virt(PFN_PHYS(bdata->node_min_pfn) + | 521 | region = phys_to_virt(PFN_PHYS(bdata->node_min_pfn) + |
| 517 | start_off); | 522 | start_off); |
| 518 | memset(region, 0, size); | 523 | memset(region, 0, size); |
| 524 | kmemleak_alloc(region, size, 1, 0); | ||
| 519 | return region; | 525 | return region; |
| 520 | } | 526 | } |
| 521 | 527 | ||
