Merge branch 'kmemleak' of git://linux-arm.org/linux-2.6
* 'kmemleak' of git://linux-arm.org/linux-2.6: kmemleak: fix kconfig for crc32 build error kmemleak: Reduce the false positives by checking for modified objects kmemleak: Show the age of an unreferenced object kmemleak: Release the object lock before calling put_object() kmemleak: Scan the _ftrace_events section in modules kmemleak: Simplify the kmemleak_scan_area() function prototype kmemleak: Do not use off-slab management with SLAB_NOLEAKTRACE
This commit is contained in:
10
mm/slab.c
10
mm/slab.c
@@ -2275,9 +2275,11 @@ kmem_cache_create (const char *name, size_t size, size_t align,
|
||||
/*
|
||||
* Determine if the slab management is 'on' or 'off' slab.
|
||||
* (bootstrapping cannot cope with offslab caches so don't do
|
||||
* it too early on.)
|
||||
* it too early on. Always use on-slab management when
|
||||
* SLAB_NOLEAKTRACE to avoid recursive calls into kmemleak)
|
||||
*/
|
||||
if ((size >= (PAGE_SIZE >> 3)) && !slab_early_init)
|
||||
if ((size >= (PAGE_SIZE >> 3)) && !slab_early_init &&
|
||||
!(flags & SLAB_NOLEAKTRACE))
|
||||
/*
|
||||
* Size is large, assume best to place the slab management obj
|
||||
* off-slab (should allow better packing of objs).
|
||||
@@ -2596,8 +2598,8 @@ static struct slab *alloc_slabmgmt(struct kmem_cache *cachep, void *objp,
|
||||
* kmemleak does not treat the ->s_mem pointer as a reference
|
||||
* to the object. Otherwise we will not report the leak.
|
||||
*/
|
||||
kmemleak_scan_area(slabp, offsetof(struct slab, list),
|
||||
sizeof(struct list_head), local_flags);
|
||||
kmemleak_scan_area(&slabp->list, sizeof(struct list_head),
|
||||
local_flags);
|
||||
if (!slabp)
|
||||
return NULL;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user