Skip to content

Commit 845f716

Browse files
crojewsk-intelbroonie
authored andcommitted
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: 0dbb186 ("ASoC: Intel: avs: Update stream status in a separate thread") Signed-off-by: Cezary Rojewski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent cfca163 commit 845f716

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sound/soc/intel/avs/pcm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ static void avs_dai_fe_shutdown(struct snd_pcm_substream *substream, struct snd_
651651

652652
data = snd_soc_dai_get_dma_data(dai, substream);
653653

654+
disable_work_sync(&data->period_elapsed_work);
654655
snd_hdac_ext_stream_release(data->host_stream, HDAC_EXT_STREAM_TYPE_HOST);
655656
avs_dai_shutdown(substream, dai);
656657
}

0 commit comments

Comments
 (0)