From: Catalin Marinas Date: Mon, 29 Jun 2009 16:13:57 +0000 (+0100) Subject: kmemleak: Do not warn if an unknown object is freed X-Git-Tag: v3.0~8575^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6e687221eb840bacd4d4a991e5f8e7ed3ae910a;p=platform%2Fkernel%2Flinux-amlogic.git kmemleak: Do not warn if an unknown object is freed vmap'ed memory blocks are not tracked by kmemleak (yet) but they may be released with vfree() which is tracked. The corresponding kmemleak warning is only enabled in debug mode. Future patch will add support for ioremap and vmap. Signed-off-by: Catalin Marinas --- diff --git a/mm/kmemleak.c b/mm/kmemleak.c index e094c4d..eeece2d 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -531,8 +531,10 @@ static void delete_object(unsigned long ptr) write_lock_irqsave(&kmemleak_lock, flags); object = lookup_object(ptr, 0); if (!object) { +#ifdef DEBUG kmemleak_warn("Freeing unknown object at 0x%08lx\n", ptr); +#endif write_unlock_irqrestore(&kmemleak_lock, flags); return; }