Messages in this thread | | | Date | Mon, 13 Jan 2014 14:56:06 -0800 | From | Greg Kroah-Hartman <> | 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
| |