linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Sasha Levin <sashal@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>,
	Lucas Tanure <tanureal@opensource.cirrus.com>,
	Mark Brown <broonie@kernel.org>, <patches@opensource.cirrus.com>,
	<alsa-devel@alsa-project.org>
Subject: Re: [PATCH AUTOSEL 5.13 03/12] ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs
Date: Wed, 18 Aug 2021 13:15:44 +0000	[thread overview]
Message-ID: <20210818131544.GL9223@ediswmail.ad.cirrus.com> (raw)
In-Reply-To: <20210817003536.83063-3-sashal@kernel.org>

On Mon, Aug 16, 2021 at 08:35:27PM -0400, Sasha Levin wrote:
> From: Lucas Tanure <tanureal@opensource.cirrus.com>
> 
> [ 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 <tanureal@opensource.cirrus.com>
> Link: https://lore.kernel.org/r/20210728104416.636591-1-tanureal@opensource.cirrus.com
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
>  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

  reply	other threads:[~2021-08-18 13:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17  0:35 [PATCH AUTOSEL 5.13 01/12] ASoC: rt5682: Adjust headset volume button threshold Sasha Levin
2021-08-17  0:35 ` [PATCH AUTOSEL 5.13 02/12] ASoC: component: Remove misplaced prefix handling in pin control functions Sasha Levin
2021-08-30 12:49   ` Pavel Machek
2021-08-17  0:35 ` [PATCH AUTOSEL 5.13 03/12] ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs Sasha Levin
2021-08-18 13:15   ` Charles Keepax [this message]
2021-08-19 13:26     ` Sasha Levin
2021-08-17  0:35 ` [PATCH AUTOSEL 5.13 04/12] platform/x86: Add and use a dual_accel_detect() helper Sasha Levin
2021-08-17  0:35 ` [PATCH AUTOSEL 5.13 05/12] ARC: Fix CONFIG_STACKDEPOT Sasha Levin
2021-08-17  0:35 ` [PATCH AUTOSEL 5.13 06/12] netfilter: ipset: Limit the maximal range of consecutive elements to add/delete Sasha Levin
2021-08-17  0:35 ` [PATCH AUTOSEL 5.13 07/12] netfilter: conntrack: collect all entries in one cycle Sasha Levin
2021-08-17  0:35 ` [PATCH AUTOSEL 5.13 08/12] once: Fix panic when module unload Sasha Levin
2021-08-17  0:35 ` [PATCH AUTOSEL 5.13 09/12] io_uring: rsrc ref lock needs to be IRQ safe Sasha Levin
2021-08-17  0:35 ` [PATCH AUTOSEL 5.13 10/12] blk-iocost: fix lockdep warning on blkcg->lock Sasha Levin
2021-08-17  0:35 ` [PATCH AUTOSEL 5.13 11/12] ovl: fix uninitialized pointer read in ovl_lookup_real_one() Sasha Levin
2021-08-17  0:35 ` [PATCH AUTOSEL 5.13 12/12] net: mscc: Fix non-GPL export of regmap APIs Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210818131544.GL9223@ediswmail.ad.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tanureal@opensource.cirrus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).