From: Catalin Marinas <catalin.marinas@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Subject: [PATCH 1/3] kmemleak: Show more information for objects found by alias
Date: Thu, 15 Jul 2010 16:09:02 +0100 [thread overview]
Message-ID: <20100715150901.21793.2120.stgit@e102109-lin.cambridge.arm.com> (raw)
In-Reply-To: <20100715150703.21793.94815.stgit@e102109-lin.cambridge.arm.com>
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 <catalin.marinas@arm.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
---
mm/kmemleak.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
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
next prev parent reply other threads:[~2010-07-15 15:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-15 15:08 [PATCH 0/3] Kmemleak patches for 2.6.36-rc1 Catalin Marinas
2010-07-15 15:09 ` Catalin Marinas [this message]
2010-07-16 9:00 ` [PATCH 1/3] kmemleak: Show more information for objects found by alias Pekka Enberg
2010-07-15 15:09 ` [PATCH 2/3] kmemleak: Introduce a default off mode for kmemleak Catalin Marinas
2010-07-16 9:00 ` Pekka Enberg
2010-07-15 15:09 ` [PATCH 3/3] kmemleak: Add DocBook style comments to kmemleak.c Catalin Marinas
2010-07-16 9:02 ` Pekka Enberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100715150901.21793.2120.stgit@e102109-lin.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®