mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
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
This commit is contained in:
commit
fea1543760
2 changed files with 4 additions and 1 deletions
|
@ -651,8 +651,8 @@ asmlinkage __visible void __init start_kernel(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
page_ext_init();
|
page_ext_init();
|
||||||
debug_objects_mem_init();
|
|
||||||
kmemleak_init();
|
kmemleak_init();
|
||||||
|
debug_objects_mem_init();
|
||||||
setup_per_cpu_pageset();
|
setup_per_cpu_pageset();
|
||||||
numa_policy_init();
|
numa_policy_init();
|
||||||
if (late_time_init)
|
if (late_time_init)
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include <linux/debugfs.h>
|
#include <linux/debugfs.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/hash.h>
|
#include <linux/hash.h>
|
||||||
|
#include <linux/kmemleak.h>
|
||||||
|
|
||||||
#define ODEBUG_HASH_BITS 14
|
#define ODEBUG_HASH_BITS 14
|
||||||
#define ODEBUG_HASH_SIZE (1 << ODEBUG_HASH_BITS)
|
#define ODEBUG_HASH_SIZE (1 << ODEBUG_HASH_BITS)
|
||||||
|
@ -110,6 +111,7 @@ static void fill_pool(void)
|
||||||
if (!new)
|
if (!new)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
kmemleak_ignore(new);
|
||||||
raw_spin_lock_irqsave(&pool_lock, flags);
|
raw_spin_lock_irqsave(&pool_lock, flags);
|
||||||
hlist_add_head(&new->node, &obj_pool);
|
hlist_add_head(&new->node, &obj_pool);
|
||||||
debug_objects_allocated++;
|
debug_objects_allocated++;
|
||||||
|
@ -1080,6 +1082,7 @@ static int __init debug_objects_replace_static_objects(void)
|
||||||
obj = kmem_cache_zalloc(obj_cache, GFP_KERNEL);
|
obj = kmem_cache_zalloc(obj_cache, GFP_KERNEL);
|
||||||
if (!obj)
|
if (!obj)
|
||||||
goto free;
|
goto free;
|
||||||
|
kmemleak_ignore(obj);
|
||||||
hlist_add_head(&obj->node, &objects);
|
hlist_add_head(&obj->node, &objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue