mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-23 20:20:21 +00:00
debugobjects: use kmemleak_not_leak for obj_cache
debug objects are placed in a list obj_pool which is static.
This is placed in __initdata which kmemleak will not scan
unless task stack scan is enabled.
We have taken the explicit choice of disabling task stack
scan by default through the creation of config in the
commit 7f15dd8a75
.
Thus kmemleak would think that there is no reference to this
and thus we will see this report as leaking memory.
Fix this by using kmemleak_not_leak() when obj_cache is
created to specify explicitly that this is not a leak.
Change-Id: I3c06911b60ce15f3aae336ef7b96c960da2270d9
Signed-off-by: Kishan Kumar <kishank@codeaurora.org>
This commit is contained in:
parent
9565f82b6e
commit
706c423e0f
@ -1077,7 +1077,7 @@ void __init debug_objects_mem_init(void)
|
||||
obj_cache = kmem_cache_create("debug_objects_cache",
|
||||
sizeof (struct debug_obj), 0,
|
||||
SLAB_DEBUG_OBJECTS, NULL);
|
||||
|
||||
kmemleak_not_leak(obj_cache);
|
||||
if (!obj_cache || debug_objects_replace_static_objects()) {
|
||||
debug_objects_enabled = 0;
|
||||
if (obj_cache)
|
||||
|
Loading…
Reference in New Issue
Block a user