From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1229436C9D7; Sat, 28 Feb 2026 17:37:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300222; cv=none; b=BpVjUgHuL50QA70FCXVMaYWizhw9nHDGGxWaFwu5hi9DWp0bzR4bt770aaq6AfZGAXkfJBp8077cxDguIqAxDfHS8FjW6BbB0RWM6Ojhws+HoV4CpfMPGO8kgK+YZhE1fP0h7hQlGh1VWTZPXaIIU/uvGEhg5hrdv8MlBQ70uBg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300222; c=relaxed/simple; bh=54uQwz80pIXJ6OnW5YNcTQCjGlRG3Xp7DvVpzKwXEs4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qumqs+OhHlS+YURg677PcMfHrNJTwtyjdS70kBstvUCpJvWaObtaeRkVGTeG1CjRCgUFZRptXIqOPt5ap7Y395xVW2TCVKS5QqBH/HF0f1tXMD9j6ZliPHlJcAFbRKnyLRD4uPoAOx9fOEcCNTc50vgsa3liej5LY2CFA/WACXY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZGQPnWsA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZGQPnWsA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48671C2BC87; Sat, 28 Feb 2026 17:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300222; bh=54uQwz80pIXJ6OnW5YNcTQCjGlRG3Xp7DvVpzKwXEs4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZGQPnWsABNG77AjLRqrZlFkLzLy4HetH/m5tDNYSRLAVESUhcfvfatMlnono7dB07 w8PvOLmaUYpHNv7tQp2KhE2a7bgPVYsSjIyjUG+YaQXG9vilqPuB/6GGlIU5obVvjY H3c1hOdLaTo9O0WUHvI+FcBJGXotn9DI5Fb8CTJ2JhDu9w7OzyEOzz5avO0j+GYXDU e4fXvZlowimkjw3gnuYUVj4u89fmeUSn/ZsO0HUEEOkY0Jh76W62CROu6bilN8mkN7 B8RJAZp5K304SIOQIxPEnENMlLxky1mDTNEmlSf8ZXu76svKmxmfGYuv5iTQznVzjb WvN64hdreU6GA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ziyi Guo , Frank Li , Mark Brown , Sasha Levin Subject: [PATCH 6.19 242/844] ASoC: fsl: imx-rpmsg: use snd_soc_find_dai_with_mutex() in probe Date: Sat, 28 Feb 2026 12:22:35 -0500 Message-ID: <20260228173244.1509663-243-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Ziyi Guo [ Upstream commit 84faa91585fa22a161763f2fe8f84a602a196c87 ] 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 Reviewed-by: Frank Li Link: https://patch.msgid.link/20260205052429.4046903-1-n7l8m4@u.northwestern.edu Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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 53f04d1f32806..76a8e68c1b620 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.51.0