From: "Catalin Marinas" <catalin.marinas@gmail.com>
To: "Mauricio Lin" <mauriciolin@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Some issues about the kernel memory leak detector: __scan_block() function
Date: Thu, 17 Aug 2006 15:03:27 +0100 [thread overview]
Message-ID: <b0943d9e0608170703u7ead4a58pd9190ac2a7942385@mail.gmail.com> (raw)
In-Reply-To: <3f250c710608170659l3d0f92c7qfe2503ce8ab58dd5@mail.gmail.com>
On 17/08/06, Mauricio Lin <mauriciolin@gmail.com> wrote:
> On 8/17/06, Catalin Marinas <catalin.marinas@gmail.com> wrote:
> > On 16/08/06, Mauricio Lin <mauriciolin@gmail.com> wrote:
> > > Let's suppose the a kmalloc() was executed without storing the
> > > returned pointer to the memory area and its fictitious returned value
> > > would be the address 0xb7d73000 as:
> > >
> > > kmalloc(32, GFP_KERNEL); // Cause memory leak
> > >
> > > Is there any possibility the __scan_block() scans a memory block that
> > > contains the memory area allocated by the previous kmalloc?
> >
> > That's what the memleak-test module does.
> >
> > Yes, there is a chance and this is called a false negative. If there
> > is a (non-)pointer location having this value (especially the stack),
> > it won't be reported. However, these locations might change and at
> > some point you will get the leak reported.
>
> Do you mean that the (non-)pointer location might be moved to another
> memory location?
No, I mean that the value at that location might be changed. Let's say
you have a location in the data section or in another kmalloc'ed block
(which is trackable from the data section) which has value 0xb7d73000.
If this just happened to be random data, there is a chance that it
will be modified to something else and a new scan won't find it
anymore.
--
Catalin
prev parent reply other threads:[~2006-08-17 14:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-16 22:19 Mauricio Lin
2006-08-17 8:28 ` Catalin Marinas
2006-08-17 13:59 ` Mauricio Lin
2006-08-17 14:03 ` Catalin Marinas [this message]
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=b0943d9e0608170703u7ead4a58pd9190ac2a7942385@mail.gmail.com \
--to=catalin.marinas@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mauriciolin@gmail.com \
/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®