Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8288890ybi; Thu, 6 Jun 2019 09:39:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqy55Oq7E+M3BcA8hoYK7htO8gaDoCrsSTagpafrFMyfEUhm6U6l4FaFvSDipYYCnozb9s+z X-Received: by 2002:a65:4306:: with SMTP id j6mr4146168pgq.418.1559839177046; Thu, 06 Jun 2019 09:39:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559839177; cv=none; d=google.com; s=arc-20160816; b=pD9lhA3zM4KlE7qq7YcMes+RB+mgnMVzmdM3tl5uNYb6yq9uV4Kj1bYOL/pTsSC5QI wYVZinOoUl66PCE/jKTH3V9D/MSl/P1KCDvT4Re1QnIlcWcmxp+tN8N/eq5dVGIc5XQb bHCSSEBUB6Nzt734Xcxep+FQxO0l3u7dtn83VXCiDddwJmK6L0EI57QsBqY8bo63+X7K HqBVnFEY/KlVxefL+mpek1yG9LwMeJhcGbEMM4blUOLQnMp0/la+61dwgK1TsQzCvMY7 nIwiEkg6dv98tOXe8YwH0hBm/iPCoceOA6dbmFXwFsFCsKocUY2KMOWDr4L+nQdvYFuz 7xkw== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=3W3Wg3p38DOmjMixnPoFj97r1OorGiA2p8K0KgYDtkg=; b=NnEsT12+nv+XMj9DmV1y1xTrECfs9JSbQ5jnJdeXfEe9Xb12JxwFtrSC44VTlB1tFX xuMW0LrawOKN1lf/Ka+rJBMD8/QHYj6Gc0o7xwJcl1ZEU/3o8akyNnmH4UVN/NUWCr8O cHf+sduRg/ENwF0IlBGA9HIBAOUSBnzNDTmZXUqxBE000hRw/ALCb0QlAysX3L3KaRXQ kPpxuZSn/BsWDMtp0SYzVHirBW5Rw3EKyyDqIv/iLfEQuBK0xxmDkJhkmIfEsk4UaLpS s5kLgudTQxI297xeegq4ApdMMTXfUitGW8O3wqrc66e4yAkdrA4c3YuXkXFT4NECwCBH ZNEQ== 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 16si2190270pfo.12.2019.06.06.09.39.20; Thu, 06 Jun 2019 09:39:37 -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 S1727504AbfFFMyA convert rfc822-to-8bit (ORCPT + 99 others); Thu, 6 Jun 2019 08:54:00 -0400 Received: from mga06.intel.com ([134.134.136.31]:10831 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726631AbfFFMyA (ORCPT ); Thu, 6 Jun 2019 08:54:00 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2019 05:53:59 -0700 X-ExtLoop1: 1 Received: from xxx.igk.intel.com (HELO xxx) ([10.237.93.170]) by orsmga005.jf.intel.com with ESMTP; 06 Jun 2019 05:53:57 -0700 Date: Thu, 6 Jun 2019 14:57:44 +0200 From: Amadeusz =?UTF-8?B?U8WCYXdpxYRza2k=?= To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org, Cezary Rojewski , linux-kernel@vger.kernel.org, Jie Yang , Liam Girdwood , Takashi Iwai , Mark Brown Subject: Re: [alsa-devel] [PATCH 02/14] ALSA: hdac: fix memory release for SST and SOF drivers Message-ID: <20190606145744.4ea389db@xxx> In-Reply-To: <190f5c09-e6ae-918e-3fcc-d91a72a895da@linux.intel.com> References: <20190605134556.10322-1-amadeuszx.slawinski@linux.intel.com> <20190605134556.10322-3-amadeuszx.slawinski@linux.intel.com> <190f5c09-e6ae-918e-3fcc-d91a72a895da@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 5 Jun 2019 10:06:47 -0500 Pierre-Louis Bossart wrote: > 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. > Yes, as mentioned in cover letter there is pending discussion, I provided it for completeness. > > > > 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); > > > > > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > https://mailman.alsa-project.org/mailman/listinfo/alsa-devel