diff options
| author | Cezary Rojewski <cezary.rojewski@intel.com> | 2025-10-23 11:23:47 +0200 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-10-23 13:42:26 +0100 |
| commit | 845f716dc5f354c719f6fda35048b6c2eca99331 (patch) | |
| tree | 6c22f0ed09b9effaafb4ac749c1909b9f5fd0f1f | |
| parent | cfca1637bc2b6b1e4f191d2f0b25f12402fbbb26 (diff) | |
ASoC: Intel: avs: Disable periods-elapsed work when closing PCM
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>
Link: https://patch.msgid.link/20251023092348.3119313-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/intel/avs/pcm.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |
