mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Ziyi Guo <n7l8m4@u.northwestern.edu>
Cc: Shengjiu Wang <shengjiu.wang@gmail.com>,
	Xiubo Li <Xiubo.Lee@gmail.com>,
	Fabio Estevam <festevam@gmail.com>,
	Nicolin Chen <nicoleotsuka@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>, Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	kernel@pengutronix.de, linux-sound@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: fsl: imx-rpmsg: use snd_soc_find_dai_with_mutex() in probe
Date: Thu, 5 Feb 2026 10:17:10 -0500	[thread overview]
Message-ID: <aYS0drbxSEsr72vp@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20260205052429.4046903-1-n7l8m4@u.northwestern.edu>

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
>

  reply	other threads:[~2026-02-05 15:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05  5:24 Ziyi Guo
2026-02-05 15:17 ` Frank Li [this message]
2026-02-05 22:40 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aYS0drbxSEsr72vp@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=Xiubo.Lee@gmail.com \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=n7l8m4@u.northwestern.edu \
    --cc=nicoleotsuka@gmail.com \
    --cc=perex@perex.cz \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=shengjiu.wang@gmail.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®