From: Cezary Rojewski <cezary.rojewski@intel.com>
To: broonie@kernel.org
Cc: tiwai@suse.com, perex@perex.cz, amadeusz.slawinski@gmail.com,
linux-sound@vger.kernel.org,
Cezary Rojewski <cezary.rojewski@intel.com>
Subject: [PATCH 2/3] ASoC: Intel: avs: Disable periods-elapsed work when closing PCM
Date: Thu, 23 Oct 2025 11:23:47 +0200 [thread overview]
Message-ID: <20251023092348.3119313-3-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20251023092348.3119313-1-cezary.rojewski@intel.com>
avs_dai_fe_shutdown() handles the shutdown procedure for HOST HDAudio
stream while period-elapsed work services its IRQs. As the former
frees the DAI's private context, these two operations shall be
synchronized to avoid slab-use-after-free or worse errors.
Fixes: 0dbb186c3510 ("ASoC: Intel: avs: Update stream status in a separate thread")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
sound/soc/intel/avs/pcm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c
index 6af10046fd36..c585830f9247 100644
--- a/sound/soc/intel/avs/pcm.c
+++ b/sound/soc/intel/avs/pcm.c
@@ -659,6 +659,7 @@ static void avs_dai_fe_shutdown(struct snd_pcm_substream *substream, struct snd_
data = snd_soc_dai_get_dma_data(dai, substream);
+ disable_work_sync(&data->period_elapsed_work);
snd_hdac_ext_stream_release(data->host_stream, HDAC_EXT_STREAM_TYPE_HOST);
avs_dai_shutdown(substream, dai);
}
--
2.25.1
next prev parent reply other threads:[~2025-10-23 9:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 9:23 [PATCH 0/3] ASoC: Intel: avs: Set of streaming fixes Cezary Rojewski
2025-10-23 9:23 ` [PATCH 1/3] ASoC: Intel: avs: Unprepare a stream when XRUN occurs Cezary Rojewski
2025-10-23 9:23 ` Cezary Rojewski [this message]
2025-10-23 9:23 ` [PATCH 3/3] ASoC: Intel: avs: Use snd_codec format when initializing probe Cezary Rojewski
2025-10-27 12:37 ` [PATCH 0/3] ASoC: Intel: avs: Set of streaming fixes Mark Brown
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=20251023092348.3119313-3-cezary.rojewski@intel.com \
--to=cezary.rojewski@intel.com \
--cc=amadeusz.slawinski@gmail.com \
--cc=broonie@kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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