summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-04 08:11:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-04 08:11:52 -0700
commitfea1543760351e10e9c573ddf8861c2f23f5b866 (patch)
treea8e48f2790d907d513a05f3b12ea78d1a7b83ffa /lib
parent81a84ad3cb5711cec79f4dd53a4ce026b092c432 (diff)
parentcaba4cbbd27d755572730801ac34fe063fc40a32 (diff)
Merge branch 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull debugobjects fix from Ingo Molnar: "A single commit making debugobjects interact better with kmemleak" * 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Make kmemleak ignore debug objects
Diffstat (limited to 'lib')
-rw-r--r--lib/debugobjects.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 17afb0430161..2f5349c6e81a 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -18,6 +18,7 @@
#include <linux/debugfs.h>
#include <linux/slab.h>
#include <linux/hash.h>
+#include <linux/kmemleak.h>
#define ODEBUG_HASH_BITS 14
#define ODEBUG_HASH_SIZE (1 << ODEBUG_HASH_BITS)
@@ -110,6 +111,7 @@ static void fill_pool(void)
if (!new)
return;
+ kmemleak_ignore(new);
raw_spin_lock_irqsave(&pool_lock, flags);
hlist_add_head(&new->node, &obj_pool);
debug_objects_allocated++;
@@ -1080,6 +1082,7 @@ static int __init debug_objects_replace_static_objects(void)
obj = kmem_cache_zalloc(obj_cache, GFP_KERNEL);
if (!obj)
goto free;
+ kmemleak_ignore(obj);
hlist_add_head(&obj->node, &objects);
}