From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: Re: [PATCH 1/2] hda - fix ELD memory leak Date: Wed, 16 Nov 2011 00:56:18 +0800 Message-ID: <20111115165618.GA4762@localhost> References: <20111115143155.GA28175@localhost> <20111115144116.GA28996@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Takashi Iwai Cc: "alsa-devel@alsa-project.org" , "Wang, Zhenyu Z" , "intel-gfx@lists.freedesktop.org" , "Barnes, Jesse" , Jeremy Bush , Christopher White , "Bossart, Pierre-louis" List-Id: intel-gfx@lists.freedesktop.org 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 > > > > > > 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