diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 474c7e9dd51a..17d5f539a9aa 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/page-isolation.h> | 46 | #include <linux/page-isolation.h> |
47 | #include <linux/page_cgroup.h> | 47 | #include <linux/page_cgroup.h> |
48 | #include <linux/debugobjects.h> | 48 | #include <linux/debugobjects.h> |
49 | #include <linux/kmemleak.h> | ||
49 | 50 | ||
50 | #include <asm/tlbflush.h> | 51 | #include <asm/tlbflush.h> |
51 | #include <asm/div64.h> | 52 | #include <asm/div64.h> |
@@ -4546,6 +4547,16 @@ void *__init alloc_large_system_hash(const char *tablename, | |||
4546 | if (_hash_mask) | 4547 | if (_hash_mask) |
4547 | *_hash_mask = (1 << log2qty) - 1; | 4548 | *_hash_mask = (1 << log2qty) - 1; |
4548 | 4549 | ||
4550 | /* | ||
4551 | * If hashdist is set, the table allocation is done with __vmalloc() | ||
4552 | * which invokes the kmemleak_alloc() callback. This function may also | ||
4553 | * be called before the slab and kmemleak are initialised when | ||
4554 | * kmemleak simply buffers the request to be executed later | ||
4555 | * (GFP_ATOMIC flag ignored in this case). | ||
4556 | */ | ||
4557 | if (!hashdist) | ||
4558 | kmemleak_alloc(table, size, 1, GFP_ATOMIC); | ||
4559 | |||
4549 | return table; | 4560 | return table; |
4550 | } | 4561 | } |
4551 | 4562 | ||