kmemleak: free internal objects only if there're no leaks to be reported
authorLi Zefan <lizefan@huawei.com>
Thu, 3 Apr 2014 21:46:26 +0000 (14:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:20:50 +0000 (16:20 -0700)
commitdc9b3f424903f7d6992778b69b1e35d864914ae5
tree83dfae0f1385d00973176b0107b990185c8ff55a
parent81c98869faa5f3a9457c93efef908ef476326b31
kmemleak: free internal objects only if there're no leaks to be reported

Currently if you stop kmemleak thread before disabling kmemleak,
kmemleak objects will be freed and so you won't be able to check
previously reported leaks.

With this patch, kmemleak objects won't be freed if there're leaks that
can be reported.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/kmemleak.c