Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp452444pxb; Wed, 18 Aug 2021 06:17:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx56rx+0qqTHhLsPOlclBKnhgcy2XzMWcJG10f2f7rERh7qaFhuZ66pRG44Bhtv3udjNf2F X-Received: by 2002:a5d:9d01:: with SMTP id j1mr7061572ioj.27.1629292651487; Wed, 18 Aug 2021 06:17:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629292651; cv=none; d=google.com; s=arc-20160816; b=ym5+J4EJPpABcQ9KIBwyu61oFcLqNIyuWSgd3tWSmAYv73oDOdy7X1UOoJie3Mcpk4 4Rz6LnH17QVJKtURQ4lwiHmq5Yzla0nAvYEgBCATdjx74jXQR/leAUr7AQNAQAZ5efTK UiJB8WxODNXsqwLzc3S5ZD82rdTckxbtwbME0b/QMZ1x5qXUKkyssYag6YHTrGBh5fOX 7hwRIMZc/kjAEBSMQK557fD9QRI2O0/7U6J2Puv/j1v0yzfFmSX7Tviktw5wE8D6o3iB sAyJ5DHVA13ZTdyLpx+mzOQXTlBIiV9CP4GnSgKTe8JOrI4faPk6nMwh2u6dm9YWLXsq FrOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=RT10YEEl56y+8zUe9U6xjHrzQdqClkYbLj6Atk7GYAo=; b=scjnha7ttHhHERpjRfqY72jDfDbOzlFfgX2p/RP0bfN0cK+Y8BEMs5A1PcrIxRmtbo 2Iy8uTYUN/Y1D1H/X0frzAEWbxStGhnwvgKJS5baMCN/0m5mlv/5ZRDtgQx5y6tBhM41 Y9OKGUQ060txBrvmnWna9bhWRuSQDqDephB+7pNxhLoiKJKtzhcydazKG5OYX8XAda1r Di6aPDzHpgJrz69C+UR+huYiDUdk8M6OUJguZfJJ8WewldYMyKDfokNFFeziPpDvyHMB dMhGvHy+FVX0n7MJsGhUDu5DoiIJ1ApWd/sRHJBrAayz7msW3ItfJjmKRJTYGcALZpZV 2mFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=HjNMFg39; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 11si5639026ilq.55.2021.08.18.06.17.14; Wed, 18 Aug 2021 06:17:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=HjNMFg39; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236298AbhHRNQ3 (ORCPT + 99 others); Wed, 18 Aug 2021 09:16:29 -0400 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:47876 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233634AbhHRNQ2 (ORCPT ); Wed, 18 Aug 2021 09:16:28 -0400 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17IDAl0S027040; Wed, 18 Aug 2021 08:15:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=RT10YEEl56y+8zUe9U6xjHrzQdqClkYbLj6Atk7GYAo=; b=HjNMFg39N0Q0J+3so/7kGFLXm4GG0+NFLyUv33EyDGRLypVvftP1ApSCavCWiLl2L70I uRgfn+ERzZEOFtZbi4rwJJ4acQkDA4VYyN2VqD+b3dj02uZ/owsIWp9/mhNVOsV2egSE Tv408e7Kd5G5y/3pTKRns6qZKVjvs1rdej5TNXk32ADZruWDxum1tnsszstN/BmhGI9B HeXPXilVQAlYoZ21O4a0DgK+uVkVjoyKWn+Jbr5W/CRPOmVvjEx2g4ChLcWkU+pDD/kS GJSBL/Gfd1QuQmjQBgwgqPiTxwJLo92RSdSB4ECOmfu4bzJiTr2dMYmmVutcaEf4foSG ow== Received: from ediex01.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 3agtd4gp6k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 18 Aug 2021 08:15:47 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 18 Aug 2021 14:15:45 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2242.12 via Frontend Transport; Wed, 18 Aug 2021 14:15:45 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id DFED445D; Wed, 18 Aug 2021 13:15:44 +0000 (UTC) Date: Wed, 18 Aug 2021 13:15:44 +0000 From: Charles Keepax To: Sasha Levin CC: , , Lucas Tanure , Mark Brown , , Subject: Re: [PATCH AUTOSEL 5.13 03/12] ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs Message-ID: <20210818131544.GL9223@ediswmail.ad.cirrus.com> References: <20210817003536.83063-1-sashal@kernel.org> <20210817003536.83063-3-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20210817003536.83063-3-sashal@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-ORIG-GUID: 07ovo_PiZY4C71smc856evkHyhsV5zae X-Proofpoint-GUID: 07ovo_PiZY4C71smc856evkHyhsV5zae X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1031 suspectscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 adultscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108180083 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 16, 2021 at 08:35:27PM -0400, Sasha Levin wrote: > From: Lucas Tanure > > [ Upstream commit acbf58e530416e167c3b323111f4013d9f2b0a7d ] > > soc_cleanup_component_debugfs will debugfs_remove_recursive > the component->debugfs_root, so adsp doesn't need to also > remove the same entry. > By doing that adsp also creates a race with core component, > which causes a NULL pointer dereference > > Signed-off-by: Lucas Tanure > Link: https://lore.kernel.org/r/20210728104416.636591-1-tanureal@opensource.cirrus.com > Signed-off-by: Mark Brown > Signed-off-by: Sasha Levin > --- > sound/soc/codecs/wm_adsp.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c > index cef05d81c39b..6698b5343974 100644 > --- a/sound/soc/codecs/wm_adsp.c > +++ b/sound/soc/codecs/wm_adsp.c > @@ -746,7 +746,6 @@ static void wm_adsp2_init_debugfs(struct wm_adsp *dsp, > static void wm_adsp2_cleanup_debugfs(struct wm_adsp *dsp) > { > wm_adsp_debugfs_clear(dsp); > - debugfs_remove_recursive(dsp->debugfs_root); > } It might be better not to backport this patch to the stable kernels. The issue has only been seen on one out of tree driver and the patch looks a little off to me. This debugfs_remove_recursive should run before the soc_cleanup_component_debugfs one, and as such it's hard to see what is actually going on. We are currently investigating internally but we might end up reverting the change, and it only seems to be causing issues on the one not upstreamed part. Apologies for missing the review of this one when it went up Mark, I was on holiday at the time. Thanks, Charles