From: Takashi Iwai Subject: Re: [PATCH v2 1/3] ALSA: hdac: Fix size allocation for ext device allocation Date: Sun, 23 Aug 2015 09:44:51 +0200 Message-ID: References: <1440310971-14849-1-git-send-email-vinod.koul@intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id A47CA260470 for ; Sun, 23 Aug 2015 09:44:52 +0200 (CEST) In-Reply-To: <1440310971-14849-1-git-send-email-vinod.koul@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Vinod Koul Cc: liam.r.girdwood@linux.intel.com, patches.audio@intel.com, alsa-devel@alsa-project.org, broonie@kernel.org List-Id: alsa-devel@alsa-project.org On Sun, 23 Aug 2015 08:22:49 +0200, Vinod Koul wrote: > > While creating hdac_ext_device, we used hdev for sizeof insteadof > edev, which resulted in eventual crash of the system Fix the size > here > > Fixes: a512f5611646 ('ALSA: hdac: add hdac extended device') > Reported-by: Subhransu S. Prusty > Signed-off-by: Vinod Koul Applied all three patches. thanks, Takashi > --- > sound/hda/ext/hdac_ext_bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/hda/ext/hdac_ext_bus.c b/sound/hda/ext/hdac_ext_bus.c > index 8544e4fb1cd3..4449d1a99089 100644 > --- a/sound/hda/ext/hdac_ext_bus.c > +++ b/sound/hda/ext/hdac_ext_bus.c > @@ -139,7 +139,7 @@ int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *ebus, int addr) > char name[15]; > int ret; > > - edev = kzalloc(sizeof(*hdev), GFP_KERNEL); > + edev = kzalloc(sizeof(*edev), GFP_KERNEL); > if (!edev) > return -ENOMEM; > hdev = &edev->hdac; > -- > 1.9.1 >