sound/soc/fsl/imx-rpmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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>
---
sound/soc/fsl/imx-rpmsg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c
index 53f04d1f3280..76a8e68c1b62 100644
--- a/sound/soc/fsl/imx-rpmsg.c
+++ b/sound/soc/fsl/imx-rpmsg.c
@@ -145,7 +145,7 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
data->dai.ignore_pmdown_time = 1;
data->dai.cpus->dai_name = pdev->dev.platform_data;
- cpu_dai = snd_soc_find_dai(data->dai.cpus);
+ cpu_dai = snd_soc_find_dai_with_mutex(data->dai.cpus);
if (!cpu_dai) {
ret = -EPROBE_DEFER;
goto fail;
--
2.34.1
On Thu, 05 Feb 2026 05:24:29 +0000, Ziyi Guo wrote:
> 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.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: fsl: imx-rpmsg: use snd_soc_find_dai_with_mutex() in probe
commit: 84faa91585fa22a161763f2fe8f84a602a196c87
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
On Thu, Feb 05, 2026 at 05:24:29AM +0000, Ziyi Guo wrote:
> 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>
> sound/soc/fsl/imx-rpmsg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c
> index 53f04d1f3280..76a8e68c1b62 100644
> --- a/sound/soc/fsl/imx-rpmsg.c
> +++ b/sound/soc/fsl/imx-rpmsg.c
> @@ -145,7 +145,7 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
> data->dai.ignore_pmdown_time = 1;
>
> data->dai.cpus->dai_name = pdev->dev.platform_data;
> - cpu_dai = snd_soc_find_dai(data->dai.cpus);
> + cpu_dai = snd_soc_find_dai_with_mutex(data->dai.cpus);
> if (!cpu_dai) {
> ret = -EPROBE_DEFER;
> goto fail;
> --
> 2.34.1
>
© 2016 - 2026 Red Hat, Inc.