[Intel-gfx] [PATCH 1/2] hda - fix ELD memory leak

Wu Fengguang fengguang.wu at intel.com
Tue Nov 15 17:56:18 CET 2011


On Tue, Nov 15, 2011 at 10:45:15PM +0800, Takashi Iwai wrote:
> At Tue, 15 Nov 2011 22:41:16 +0800,
> Wu Fengguang wrote:
> > 
> > On Tue, Nov 15, 2011 at 10:35:41PM +0800, Takashi Iwai wrote:
> > > At Tue, 15 Nov 2011 22:31:55 +0800,
> > > Wu Fengguang wrote:
> > > > 
> > > > memset(eld) clears eld->proc_entry which will leak the struct
> > > > snd_info_entry when unloading the module.
> > > > 
> > > > Fix it by
> > > > - remove memset(eld)
> > > > - set eld->eld_valid to true _after_ all eld fields have been filled
> > > > - don't access the other eld fields when (eld->eld_valid == false)
> > > > 
> > > > Signed-off-by: Wu Fengguang <fengguang.wu at intel.com>
> > > 
> > > This should be send to stable kernel, too, right?
> > > It appears in 3.1, at least.
> > 
> > Yeah. Good point!  I'll resend it when everything goes fine.
> 
> Ah, no, you don't need to resend.  I'd just need to put Cc to stable
> in the patch commit log.  Then Greg will pick it up automatically
> when the tree is merged to the upstream.

Ah OK, that would be convenient.

> But of course I need to know beforehand whether the patch is intended
> to be sent to stable or not.

Ack. The patch applies cleanly to 3.1.

Thanks,
Fengguang



More information about the Intel-gfx mailing list