aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2013-10-30 06:04:00 -0400
committerPekka Enberg <penberg@iki.fi>2013-10-30 08:08:52 -0400
commit0172f779e4314639a8ed440082cfe9e3450954e8 (patch)
tree48115e3a18009a192e124fca81454778ef6b35ef /mm/slab.c
parente7444d9b7d49898a667074122bed2dcedf349305 (diff)
slab: fix to calm down kmemleak warning
After using struct page as slab management, we should not call kmemleak_scan_area(), since struct page isn't the tracking object of kmemleak. Without this patch and if CONFIG_DEBUG_KMEMLEAK is enabled, so many kmemleak warnings are printed. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Pekka Enberg <penberg@iki.fi>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/mm/slab.c b/mm/slab.c
index af2db76e1f5a..a8a93497d7d6 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2531,14 +2531,6 @@ static struct freelist *alloc_slabmgmt(struct kmem_cache *cachep,
2531 /* Slab management obj is off-slab. */ 2531 /* Slab management obj is off-slab. */
2532 freelist = kmem_cache_alloc_node(cachep->freelist_cache, 2532 freelist = kmem_cache_alloc_node(cachep->freelist_cache,
2533 local_flags, nodeid); 2533 local_flags, nodeid);
2534 /*
2535 * If the first object in the slab is leaked (it's allocated
2536 * but no one has a reference to it), we want to make sure
2537 * kmemleak does not treat the ->s_mem pointer as a reference
2538 * to the object. Otherwise we will not report the leak.
2539 */
2540 kmemleak_scan_area(&page->lru, sizeof(struct list_head),
2541 local_flags);
2542 if (!freelist) 2534 if (!freelist)
2543 return NULL; 2535 return NULL;
2544 } else { 2536 } else {