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 v2 2/3] ASoC: Intel: avs: Disable periods-elapsed work when closing PCM
Date: Mon, 27 Oct 2025 12:01:05 +0100 [thread overview]
Message-ID: <20251027110106.3157415-3-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20251027110106.3157415-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 501466bd1f7f..80c001120cdd 100644
--- a/sound/soc/intel/avs/pcm.c
+++ b/sound/soc/intel/avs/pcm.c
@@ -651,6 +651,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-27 10:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 11:01 [PATCH v2 0/3] ASoC: Intel: avs: Set of streaming fixes Cezary Rojewski
2025-10-27 11:01 ` [PATCH v2 1/3] ASoC: Intel: avs: Unprepare a stream when XRUN occurs Cezary Rojewski
2025-10-27 11:01 ` Cezary Rojewski [this message]
2025-10-27 11:01 ` [PATCH v2 3/3] ASoC: Intel: avs: Use snd_codec format when initializing probe Cezary Rojewski
2025-10-27 12:37 ` [PATCH v2 0/3] ASoC: Intel: avs: Set of streaming fixes Mark Brown
2025-10-27 12:44 ` Mark Brown
2025-10-27 14:43 ` Cezary Rojewski
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=20251027110106.3157415-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