This is a note to let you know that I've just added the patch titled ASoC: Intel: avs: Access path components under lock to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: asoc-intel-avs-access-path-components-under-lock.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d849996f7458042af803b7d15a181922834c5249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amadeuszx.slawinski@xxxxxxxxxxxxxxx> Date: Fri, 19 May 2023 22:17:06 +0200 Subject: ASoC: Intel: avs: Access path components under lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Amadeusz Sławiński <amadeuszx.slawinski@xxxxxxxxxxxxxxx> commit d849996f7458042af803b7d15a181922834c5249 upstream. Path and its components should be accessed under lock to prevent problems with one thread modifying them while other tries to read. Fixes: c8c960c10971 ("ASoC: Intel: avs: APL-based platforms support") Reviewed-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@xxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20230519201711.4073845-3-amadeuszx.slawinski@xxxxxxxxxxxxxxx Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/soc/intel/avs/apl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/sound/soc/intel/avs/apl.c +++ b/sound/soc/intel/avs/apl.c @@ -173,6 +173,7 @@ static bool apl_lp_streaming(struct avs_ { struct avs_path *path; + spin_lock(&adev->path_list_lock); /* Any gateway without buffer allocated in LP area disqualifies D0IX. */ list_for_each_entry(path, &adev->path_list, node) { struct avs_path_pipeline *ppl; @@ -192,11 +193,14 @@ static bool apl_lp_streaming(struct avs_ if (cfg->copier.dma_type == INVALID_OBJECT_ID) continue; - if (!mod->gtw_attrs.lp_buffer_alloc) + if (!mod->gtw_attrs.lp_buffer_alloc) { + spin_unlock(&adev->path_list_lock); return false; + } } } } + spin_unlock(&adev->path_list_lock); return true; } Patches currently in stable-queue which might be from amadeuszx.slawinski@xxxxxxxxxxxxxxx are queue-6.1/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch queue-6.1/asoc-intel-skylake-fix-declaration-of-enum-skl_ch_cfg.patch queue-6.1/asoc-intel-avs-fix-declaration-of-enum-avs_channel_config.patch queue-6.1/asoc-intel-avs-access-path-components-under-lock.patch