Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6903600ybi; Wed, 5 Jun 2019 08:08:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBc+jt7e/zWYg3cFGErRgd4QTsLNvQnB3m2wETVlN9LqOK96RMmzdS5+EigW9HaDrtRsdp X-Received: by 2002:a63:184:: with SMTP id 126mr5052471pgb.420.1559747339311; Wed, 05 Jun 2019 08:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559747339; cv=none; d=google.com; s=arc-20160816; b=Cn4RcmiT3LiTuufdYQbKqiCJGcY+LipxVhRUxSI7I3ob4FAZ61zBrM2JStpMUbRMT5 h3y/zTYQiGrAOWAuV/M3tDxQmw8xY+bcKbrT4OEUkMODV6MNZUPs7VMP4MpC2ilknRgX OOkaS6sqniHEQg5AA6Pu5TPTsAPtijaBpQpgKDuxyBkyEBV8ttc/PnSfYM+kkqLvXaHN ICSAquD9TkOp6QNELJLRAr0nfulIuVDUzy6KCJdv0g3WX4I2vtkZ1M2OTwOnGniMn73z vQvKmdwqrQgHgtMO6piZWXT/rst2lIRnuBVB1ZPB9NbTp3K82+RfGkDpISi8H/G/4MFH GhTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Nm0/yzSa4QvN7W57h+xrLKLq3x9dbS4+ut8Zeq3urgA=; b=aSLUXUZe8y4lehY2AGJlutCUefi5UOxw2OaemPAoSPdiA5ZVxzeu1sWsAM29YakLE3 Ex0ULMVrr5SbiwwNBHodLzSoLqPtQygfuUrpq1OUkPtFNi288UMX+XMo4QCrp263/tcZ vyI4+72PB329gm3VQ8OOapKTglZArwHCuTlm5NhVsD8hOESp4uB38Kg8kn+3R4VV8Wg9 qUghlB61ceDmuFrON7Zjq0aOU1VzR9byn3bUcOdEzeKsu5w8OIR8Zgzmk3SPDs54w5ij 8v7tS0Ttu+Vc+YhF1EZAtCTFFUfsVKPut+X5QbVlCkSqfjZAl3Pvt3XBKF8lsWINxRKk 399A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16si26260886pgl.570.2019.06.05.08.08.39; Wed, 05 Jun 2019 08:08:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728563AbfFEPGs (ORCPT + 99 others); Wed, 5 Jun 2019 11:06:48 -0400 Received: from mga07.intel.com ([134.134.136.100]:28134 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726442AbfFEPGr (ORCPT ); Wed, 5 Jun 2019 11:06:47 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2019 08:06:47 -0700 X-ExtLoop1: 1 Received: from linux.intel.com ([10.54.29.200]) by orsmga004.jf.intel.com with ESMTP; 05 Jun 2019 08:06:47 -0700 Received: from kwong4-mobl.amr.corp.intel.com (unknown [10.252.203.122]) by linux.intel.com (Postfix) with ESMTP id 755CC5800BD; Wed, 5 Jun 2019 08:06:46 -0700 (PDT) Subject: Re: [PATCH 02/14] ALSA: hdac: fix memory release for SST and SOF drivers To: =?UTF-8?Q?Amadeusz_S=c5=82awi=c5=84ski?= , alsa-devel@alsa-project.org Cc: Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown , Jie Yang , Cezary Rojewski , linux-kernel@vger.kernel.org References: <20190605134556.10322-1-amadeuszx.slawinski@linux.intel.com> <20190605134556.10322-3-amadeuszx.slawinski@linux.intel.com> From: Pierre-Louis Bossart Message-ID: <190f5c09-e6ae-918e-3fcc-d91a72a895da@linux.intel.com> Date: Wed, 5 Jun 2019 10:06:47 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190605134556.10322-3-amadeuszx.slawinski@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/5/19 8:45 AM, Amadeusz Sławiński wrote: > During the integration of HDaudio support, we changed the way in which > we get hdev in snd_hdac_ext_bus_device_init() to use one preallocated > with devm_kzalloc(), however it still left kfree(hdev) in > snd_hdac_ext_bus_device_exit(). It leads to oopses when trying to > rmmod and modprobe. Fix it, by just removing kfree call. > > SOF also uses some of the snd_hdac_ functions for HDAudio support but > allocated the memory with kzalloc. A matching fix is provided > separately to align all users of the snd_hdac_ library. There are stability issues with this change (already shared in a separate series) and additional findings reported by Libin so this should not be applied for now. > > Fixes: 6298542fa33b ("ALSA: hdac: remove memory allocation from snd_hdac_ext_bus_device_init") > Reviewed-by: Takashi Iwai > Signed-off-by: Amadeusz Sławiński > Signed-off-by: Pierre-Louis Bossart > --- > sound/hda/ext/hdac_ext_bus.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/sound/hda/ext/hdac_ext_bus.c b/sound/hda/ext/hdac_ext_bus.c > index c203af71a099..f33ba58b753c 100644 > --- a/sound/hda/ext/hdac_ext_bus.c > +++ b/sound/hda/ext/hdac_ext_bus.c > @@ -170,7 +170,6 @@ EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_init); > void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev) > { > snd_hdac_device_exit(hdev); > - kfree(hdev); > } > EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_exit); > >