linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eugeniu Rosca <erosca@de.adit-jv.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: "Eugeniu Rosca" <erosca@de.adit-jv.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	"Yanmin Zhang" <yanmin_zhang@linux.intel.com>,
	"Eugeniu Rosca" <roscaeugeniu@gmail.com>,
	"Jiada Wang" <jiada_wang@mentor.com>,
	"Zhang Yanmin" <yanmin.zhang@intel.com>,
	"Ramesh Babu" <ramesh.babu@intel.com>,
	"Dean Jenkins" <Dean_Jenkins@mentor.com>,
	"Ramesh Babu B" <ramesh.babu.b@intel.com>,
	"xiao jin" <jin.xiao@intel.com>,
	"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
	"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Ranjani Sridharan" <ranjani.sridharan@linux.intel.com>,
	"Bard Liao" <yung-chuan.liao@linux.intel.com>,
	"Kai Vehmanen" <kai.vehmanen@linux.intel.com>,
	"Peter Ujfalusi" <peter.ujfalusi@linux.intel.com>,
	"Guennadi Liakhovetski" <guennadi.liakhovetski@linux.intel.com>,
	"Rander Wang" <rander.wang@linux.intel.com>
Subject: Re: [PATCH] ASoC: soc-pcm: fix fe and be race when accessing substream->runtime
Date: Tue, 27 Sep 2022 13:00:22 +0200	[thread overview]
Message-ID: <20220927110022.GA3802@lxhi-065> (raw)
In-Reply-To: <2f5a510b-082a-60e2-5770-58be086b5fc8@intel.com>

Hello Czarek,

On Di, Sep 27, 2022 at 09:50:05 +0200, Cezary Rojewski wrote:
> On 2022-09-26 6:35 PM, Eugeniu Rosca wrote:
> >From: xiao jin <jin.xiao@intel.com>
> >
> >After start of fe and be, fe might go to close without triggering
> >STOP, and substream->runtime is freed. However, be is still at
> >START state and its substream->runtime still points to the
> >freed runtime.
> >
> >Later on, FE is opened/started again, and triggers STOP.
> >snd_pcm_do_stop => dpcm_fe_dai_trigger
> >                 => dpcm_fe_dai_do_trigger
> >                 => dpcm_be_dai_trigger
> >                 => dpcm_do_trigger
> >                 => soc_pcm_trigger
> >                 => skl_platform_pcm_trigger
> >skl_platform_pcm_trigger accesses the freed old runtime data and
> >kernel panic.
> >
> >The patch fixes it by assigning be_substream->runtime in
> >dpcm_be_dai_startup when be's state is START.
> >
> >Signed-off-by: xiao jin <jin.xiao@intel.com>
> >Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
> >Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
> 
> Hello,
> 
> The change seems to be driven by the skylake-driver problem. 

Agreed, based on the author/co-signer's e-mail and the call stack.

> With all due
> respect, why not ping owners of the driver first? There are some crucial CCs
> missing.

Some feedback already provided by Pierre-Louis Bossart (many thanks).
Cc-ing more Intel contributors in the sound subsystem.

> 
> I'd like to know more about the scenario you guys reproduced the problem in.

This patch was originally identified in the Intel Apollo Lake v4.1 KNLs.
Given that the change itself is in the core sound subsystem, our internal
assessment was that the patch might potentially be relevant/helpful
on other HW platforms.

Our intention is to confirm or invalidate this assumption with the
original developers of the patch, as well as with the audio maintainers
and the members of the alsa-devel ML.

> Configuration details and kernel base would be good to know too. Since our
> CI did not detect problem of such sort, if the problem actually exists, we
> would like to append a test or two to cover it later on.

If there is no evidence that the patch is fixing a real-life issue
occurring in the latest vanilla, I agree to drop the patch.

So far, I do not possess this evidence myself.

> Regards,
> Czarek

Best regards,
Eugeniu

  reply	other threads:[~2022-09-27 11:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1664210154-11552-1-git-send-email-erosca@de.adit-jv.com>
2022-09-27  7:34 ` [PATCH] ASoC: soc-pcm: fix fe and be race when accessing substream->runtime Amadeusz Sławiński
2022-09-27 11:56   ` Eugeniu Rosca
2022-09-27  7:50 ` Cezary Rojewski
2022-09-27 11:00   ` Eugeniu Rosca [this message]
2022-09-28 14:24     ` Cezary Rojewski
2022-09-29 16:25       ` Eugeniu Rosca
2022-09-27  7:51 ` Pierre-Louis Bossart
2022-09-27 12:30   ` Eugeniu Rosca
2022-09-28  8:36     ` Pierre-Louis Bossart
2022-09-29 16:36       ` Eugeniu Rosca

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=20220927110022.GA3802@lxhi-065 \
    --to=erosca@de.adit-jv.com \
    --cc=Dean_Jenkins@mentor.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=jiada_wang@mentor.com \
    --cc=jin.xiao@intel.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ramesh.babu.b@intel.com \
    --cc=ramesh.babu@intel.com \
    --cc=rander.wang@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=roscaeugeniu@gmail.com \
    --cc=tiwai@suse.com \
    --cc=yanmin.zhang@intel.com \
    --cc=yanmin_zhang@linux.intel.com \
    --cc=yung-chuan.liao@linux.intel.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).