From: Catalin Marinas <catalin.marinas@arm.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Dave Jones <davej@redhat.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: kmemleak reports firmware loader funnies in iwlwifi
Date: Mon, 29 Jun 2009 15:33:56 +0100 [thread overview]
Message-ID: <1246286036.21450.35.camel@pc1117.cambridge.arm.com> (raw)
In-Reply-To: <84144f020906290248w474ad2ffpe6a8b5bede3d2c20@mail.gmail.com>
On Mon, 2009-06-29 at 12:48 +0300, Pekka Enberg wrote:
> Hi Catalin,
>
> On Mon, Jun 29, 2009 at 12:39 PM, Catalin
> Marinas<catalin.marinas@arm.com> wrote:
> > diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
> > index ddeb819..26fb808 100644
> > --- a/drivers/base/firmware_class.c
> > +++ b/drivers/base/firmware_class.c
> > @@ -179,6 +179,13 @@ static ssize_t firmware_loading_store(struct device *dev,
> > dev_err(dev, "%s: vmap() failed\n", __func__);
> > goto err;
> > }
> > + /*
> > + * This block of memory is later freed using vfree.
> > + * Since kmemleak does not track vmap calls, just
> > + * inform it about this block but ignore it during
> > + * scanning.
> > + */
> > + kmemleak_alloc(fw_priv->fw->data, 0, -1, GFP_KERNEL);
> > /* Pages will be freed by vfree() */
> > fw_priv->pages = NULL;
> > fw_priv->page_array_size = 0;
>
> Would it be possible to put this hook in vmap() somehow?
I tried to do this but it has some other implications. If I add the vmap
hook, I would need to add vunmap as well. On ARM, at least, iounmap
calls vunmap (but not vmap) which means that I would need to add ioremap
support as well. That's not a bug issue but this is more like a new
feature than a bug fix.
I propose that for now I disable the kmemleak warning for unknown
pointers and add a patch to linux-next which tracks ioremap and vmap
mappings. Does this sound fine?
Thanks.
--
Catalin
next prev parent reply other threads:[~2009-06-29 14:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-26 17:19 Dave Jones
2009-06-29 9:39 ` Catalin Marinas
2009-06-29 9:48 ` Pekka Enberg
2009-06-29 9:50 ` Catalin Marinas
2009-06-29 14:33 ` Catalin Marinas [this message]
2009-06-29 14:35 ` 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=1246286036.21450.35.camel@pc1117.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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®