From: Catalin Marinas Date: Mon, 19 Jul 2010 10:54:16 +0000 (+0100) Subject: kmemleak: Show more information for objects found by alias X-Git-Tag: upstream/snapshot3+hdmi~13514^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7686a45c07462b78df5ac15fc696a86e57ccf91;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git kmemleak: Show more information for objects found by alias There may be situations when an object is freed using a pointer inside the memory block. Kmemleak should show more information to help with debugging. Signed-off-by: Catalin Marinas Acked-by: Pekka Enberg --- diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 2c0d032..c2c9feb 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -398,7 +398,9 @@ static struct kmemleak_object *lookup_object(unsigned long ptr, int alias) object = prio_tree_entry(node, struct kmemleak_object, tree_node); if (!alias && object->pointer != ptr) { - kmemleak_warn("Found object by alias"); + pr_warning("Found object by alias at 0x%08lx\n", ptr); + dump_stack(); + dump_object_info(object); object = NULL; } } else