Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: fsl: imx-rpmsg: use snd_soc_find_dai_with_mutex() in probe

imx_rpmsg_probe() calls snd_soc_find_dai() without holding client_mutex.
However, snd_soc_find_dai() has lockdep_assert_held(&client_mutex)
indicating callers must hold this lock, as the function iterates over the
global component list.

All other callers of snd_soc_find_dai() either hold client_mutex via the
snd_soc_bind_card() path or use the snd_soc_find_dai_with_mutex() wrapper.

Use snd_soc_find_dai_with_mutex() instead to fix the missing lock
protection.

Signed-off-by: Ziyi Guo <n7l8m4@u.northwestern.edu>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260205052429.4046903-1-n7l8m4@u.northwestern.edu
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Ziyi Guo and committed by
Mark Brown
84faa915 fef1f756

+1 -1
+1 -1
sound/soc/fsl/imx-rpmsg.c
··· 145 145 data->dai.ignore_pmdown_time = 1; 146 146 147 147 data->dai.cpus->dai_name = pdev->dev.platform_data; 148 - cpu_dai = snd_soc_find_dai(data->dai.cpus); 148 + cpu_dai = snd_soc_find_dai_with_mutex(data->dai.cpus); 149 149 if (!cpu_dai) { 150 150 ret = -EPROBE_DEFER; 151 151 goto fail;