[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140113225606.GA4132@kroah.com>
Date: Mon, 13 Jan 2014 14:56:06 -0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Yann Droneaud <ydroneaud@...eya.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCHv1] driver core/platform: don't leak memory allocated for
dma_mask
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists