From: Catalin Marinas <catalin.marinas@arm.com>
To: Dave Jones <davej@redhat.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: kmemleak false positive?
Date: Thu, 25 Jun 2009 16:25:39 +0100 [thread overview]
Message-ID: <1245943539.26218.70.camel@pc1117.cambridge.arm.com> (raw)
In-Reply-To: <20090625145600.GA6654@redhat.com>
On Thu, 2009-06-25 at 10:56 -0400, Dave Jones wrote:
> On Thu, Jun 25, 2009 at 10:25:17AM +0100, Catalin Marinas wrote:
> > > kmemleak: backtrace:
> > > kmemleak: [<c04fd8b3>] kmemleak_alloc+0x193/0x2b8
> > > kmemleak: [<c04f5e73>] kmem_cache_alloc+0x11e/0x174
> > > kmemleak: [<c0aae5a7>] debug_objects_mem_init+0x63/0x1d9
> > > kmemleak: [<c0a86a62>] start_kernel+0x2da/0x38d
> > > kmemleak: [<c0a86090>] i386_start_kernel+0x7f/0x98
> > > kmemleak: [<ffffffff>] 0xffffffff
> >
> > It could be a false positive. Do you get some "kmemleak: referenced"
> > messages as well at a later time? In this case, it is just transient
> > "leak", caused maybe by pointers stored on the stack or registers.
>
> Yes, some time later.
[...]
> Hmm, it's pretty noisy, and everything it's found so far looks to be
> a false positive.
In this case, it would make sense to enable task stacks scanning by
default:
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 17096d1..a38418a 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -194,7 +194,7 @@ static unsigned long jiffies_min_age;
/* delay between automatic memory scannings */
static signed long jiffies_scan_wait;
/* enables or disables the task stacks scanning */
-static int kmemleak_stack_scan;
+static int kmemleak_stack_scan = 1;
/* mutex protecting the memory scanning */
static DEFINE_MUTEX(scan_mutex);
/* mutex protecting the access to the /sys/kernel/debug/kmemleak file */
> > You can mount debugfs on /sys/kerne/debug and read the kmemleak file in
> > there (it triggers a new scan as well).
>
> Currently prints the acpi traces I already posted.
If they are still consistently shown with stack=on, it could be a leak.
--
Catalin
next prev parent reply other threads:[~2009-06-25 15:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-25 0:11 Dave Jones
2009-06-25 9:25 ` Catalin Marinas
2009-06-25 14:56 ` Dave Jones
2009-06-25 15:25 ` Catalin Marinas [this message]
2009-06-25 15:40 ` Dave Jones
2009-06-25 17:00 ` Catalin Marinas
2009-06-25 19:31 ` Dave Jones
2009-06-25 19:49 ` Stephen Smalley
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=1245943539.26218.70.camel@pc1117.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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®