]> git.baikalelectronics.ru Git - kernel.git/commit
mm: postpone the disabling of kmemleak early logging
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 9 May 2014 22:36:59 +0000 (15:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 11 May 2014 08:55:48 +0000 (17:55 +0900)
commit08541b5c839fcf6d28c1927d9630dc35ea8a26c7
tree6993600a8b65e4d03db299162095cf205575af75
parent63205af58f72676f48ec54027ef551fd052fd1a6
mm: postpone the disabling of kmemleak early logging

Commit 1e9ab05db597 ("kmemleak: change some global variables to int"),
in addition to the atomic -> int conversion, moved the disabling of
kmemleak_early_log to the beginning of the kmemleak_init() function,
before the full kmemleak tracing is actually enabled.  In this small
window, kmem_cache_create() is called by kmemleak which triggers
additional memory allocation that are not traced.  This patch restores
the original logic with kmemleak_early_log disabling when kmemleak is
fully functional.

Fixes: 1e9ab05db597 (kmemleak: change some global variables to int)
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Li Zefan <lizefan@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/kmemleak.c