lkml.org 
[lkml]   [2014]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2014-01-14 00:21    [W:0.075 / U:1.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site