From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Yann Droneaud <ydroneaud@opteya.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCHv1] driver core/platform: don't leak memory allocated for dma_mask
Date: Mon, 13 Jan 2014 14:56:06 -0800 [thread overview]
Message-ID: <20140113225606.GA4132@kroah.com> (raw)
In-Reply-To: <1389649085-7365-1-git-send-email-ydroneaud@opteya.com>
On Mon, Jan 13, 2014 at 10:38:05PM +0100, Yann Droneaud wrote:
> If a dma_mask is provided as part of platform_device_info,
> platform_device_register_full() allocate memory for a u64
> using kmalloc().
>
> A comment in the code state that "[t]his memory isn't freed
> when the device is put".
>
> It's never a good thing to leak memory, but there's only very
> few users of platform_device_info's dma_mask, and those are mostly
> "static" devices that are not going to be plugged/unplugged.
Why haven't you cc:ed the author of that comment? He would be best to
evaluate if this patch is good enough or not.
And is leaking that memory really an issue? As you point out, these
aren't devices that are going to go away (I'd argue that no platform
device should ever be a removable device, but that's a longer
argument...)
Please resend and cc: all of the needed developers.
thanks,
greg k-h
next prev parent reply other threads:[~2014-01-13 22:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 22:10 [PATCH] driver core/platform: don't leak memory allocated for dma_mask Yann Droneaud
2014-01-13 21:38 ` [PATCHv1] " Yann Droneaud
2014-01-13 22:56 ` Greg Kroah-Hartman [this message]
2014-01-14 7:18 ` [PATCHv2] " Yann Droneaud
2014-01-14 8:19 ` Uwe Kleine-König
2014-01-14 9:57 ` Yann Droneaud
2014-01-14 10:36 ` Uwe Kleine-König
2014-01-14 18:02 ` Greg Kroah-Hartman
2014-01-26 21:18 ` [PATCHv3] " Yann Droneaud
2014-01-27 10:05 ` [PATCHv4] " Yann Droneaud
2014-02-07 23:20 ` Greg Kroah-Hartman
2014-02-08 15:09 ` Uwe Kleine-König
2014-02-09 7:47 ` Yann Droneaud
2014-02-09 9:30 ` Uwe Kleine-König
2014-02-15 19:39 ` Greg Kroah-Hartman
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=20140113225606.GA4132@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ydroneaud@opteya.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