From nobody Sat Feb 7 04:46:56 2026 Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA8C83816E9 for ; Mon, 2 Feb 2026 17:41:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770054077; cv=none; b=E0CvTpkpY/Pt9uotlt1HXdN5Vmt6UZc9VvrhDj1y7PwoppeGqjlCXNZy/7E2CCUM7qMN2EvO8E07+Yn5v4eGZT0bTkEo0d01NPztzRqqMZPqyI55gm6fgi/T4DKR5PnhwQR0pHtbHc+mPcCOCfciGxzutXy4zlhyXgeGaFuq3FY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770054077; c=relaxed/simple; bh=bZsxtFUKVkrouGucn5eV4t3DMurRpfWUeca7gWfPleg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ZwxqMDqiQ8iTdN1AU8PZK0UosfV7F+5XvM0a0iyBTUmxuQ2AgS5GoFlimerYMi711dHNgIs9iHidOsnwLUz4iQszslcgiD8jEuCEkRyhSDLNPHwu8u1hf0/m+uVutc3eA/wAFVOCwDDY81SmmL0YE0QEgs64Ndob9du7oxAI21c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=u.northwestern.edu; spf=pass smtp.mailfrom=u.northwestern.edu; dkim=pass (2048-bit key) header.d=u-northwestern-edu.20230601.gappssmtp.com header.i=@u-northwestern-edu.20230601.gappssmtp.com header.b=tYUSACgo; arc=none smtp.client-ip=209.85.210.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=u.northwestern.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=u.northwestern.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=u-northwestern-edu.20230601.gappssmtp.com header.i=@u-northwestern-edu.20230601.gappssmtp.com header.b="tYUSACgo" Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-7cfdf0c8908so2866240a34.0 for ; Mon, 02 Feb 2026 09:41:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=u-northwestern-edu.20230601.gappssmtp.com; s=20230601; t=1770054075; x=1770658875; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=s8hbofn9BxxsYVhBolr0rYFiwuYMaB/sew2pKb65Ces=; b=tYUSACgoddeO9rXieo7uG9ShLytoH2WyLABk/l/tPJWdwU1xRRepj/JbZyemgwR4ei Jptp4d7TowLsorrTzFNZaYYEf7/xOfFDbXooJCWOF8U+AZ7adoKPxYMrDmOPORunnD+/ Jd1v4KgGPdJ7/7gqIJtEJXVfufrAFdSvp2k9V0angdnsIWAELhzUAG93bQfHGKdq1L3H pmFSePmg8n1W3TbMixRjJGXEWeyuxGwLyaBePpeLsM3TEXlOKfGVfq85IAvc6f3wjaBD RxAfNMPOyCqdHPKBCrsreMYyMTmVzskuANE1F1XY9O+dxr71asOY3uRMbjw15OnwKC8v G0xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770054075; x=1770658875; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=s8hbofn9BxxsYVhBolr0rYFiwuYMaB/sew2pKb65Ces=; b=aYKhkEqUAGC5FJnH8wvzXR1L+ADB/W8LL4vTxvwuR8C7yEoMEtkeEStk8kl8p2ZsCV ndpkN0wk4UBNAN6gJcjnHm7toEy+bYj9kxDKvXlz2LKpjM+4BPTG6QkzueZQZuWCvuZa 7SvCo7mSAZ994ENajKLiMYRw0g92fS/D0SbGP1RvkHoczW/PurBuzEdlJgf00iVb6Hti hWoxUsQYEqR83mz64FsptLYyHd0nJVRpD5p7WshiweDD+w43KXhrqyA/eDhNyf04ohoz bGW6P9nTsiC5GXdnWCbyQP+XuJH7uQHIzSsTG7b0ecC3ELgYyHWr71EGGOxYn3IK9rmU Qf3Q== X-Forwarded-Encrypted: i=1; AJvYcCVlZIH9w6/Qyo3dBEDkU6lrmIe9UMNEg1d2PWiBN/FclO7+JFf8X/bGqIvoV4P6AKOgp2TMqVDurxfBrMY=@vger.kernel.org X-Gm-Message-State: AOJu0Yx43+WShOo1m1HsRjFaZikfOJmJ5AE2xLRP4nyjEALp7p/3O0OF PzMVLol4J9iqxM3PUv90I5/rbRs64ozqyWBvLnObppr/1LFukasFblOaJEIECFegy6k= X-Gm-Gg: AZuq6aKWKIej4KITJ3yJ6+r0jOP77LGAN48MNMPn+9tjwAAXipo+rXDwJ/bM04Hmt+D En2ZaiT42hWrdRlw+mdmJnf6t0tn7W9WNhZ42rWty2nqD/lTFBReuOhqWNBvWTECZtRASEWL7mM MSEYa2nABnylN5QZnA/B1ZZGzK/aJK0OmVoM73PXTnWSAcKavJYM9CrxmUU4nUSy0ZwjpghmyeY ZuzwbSQKYEmRIt4l1Jtz31qn40j0X/oCBXz18Q8leMJs1iB1mvBVPDQjMKCP52le5tgDkWaY17q lJGnjE1GsMxr7lV2fr/ruYsWOuK26OeZFr9TVQzJgkUfdl++Qgmv+Tu83lBA6WBjBCK3HtPtIic Z3orTdub/kWabbeg7cXVOCxDgdLlbrxydcfCu/GE7NWhMSPcXeagx8WwBfq3Lr/3MC9L8/CFe5b vgvJVC1AE7kx8tUUPM9rTPDWbm/zjLtNG8WGAvq0aYcVRM0j8ntPn/1VFnDY63OHGYM65Atiuy8 XJHbrOMjVYNJ2K+YtMbaTjHWBrqJK4= X-Received: by 2002:a9d:7549:0:b0:7d2:eb51:ca21 with SMTP id 46e09a7af769-7d2eb51d9ddmr3079904a34.23.1770054074769; Mon, 02 Feb 2026 09:41:14 -0800 (PST) Received: from security.cs.northwestern.edu (security.cs.northwestern.edu. [165.124.184.136]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d18c7ffcc7sm10936421a34.23.2026.02.02.09.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 09:41:14 -0800 (PST) From: Ziyi Guo To: Shengjiu Wang , Xiubo Li Cc: Fabio Estevam , Nicolin Chen , Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ziyi Guo Subject: [PATCH] ASoC: fsl_xcvr: fix missing lock in fsl_xcvr_mode_put() Date: Mon, 2 Feb 2026 17:41:12 +0000 Message-Id: <20260202174112.2018402-1-n7l8m4@u.northwestern.edu> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" fsl_xcvr_activate_ctl() has=20 lockdep_assert_held(&card->snd_card->controls_rwsem), but fsl_xcvr_mode_put() calls it without acquiring this lock. Other callers of fsl_xcvr_activate_ctl() in fsl_xcvr_startup() and fsl_xcvr_shutdown() properly acquire the lock with down_read()/up_read(). Add the missing down_read()/up_read() calls around fsl_xcvr_activate_ctl() in fsl_xcvr_mode_put() to fix the lockdep assertion and prevent potential race conditions when multiple userspace threads access the control. Signed-off-by: Ziyi Guo --- sound/soc/fsl/fsl_xcvr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index a268fb81a2f8..0b9dd64b9a82 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -223,10 +223,13 @@ static int fsl_xcvr_mode_put(struct snd_kcontrol *kco= ntrol, =20 xcvr->mode =3D snd_soc_enum_item_to_val(e, item[0]); =20 + down_read(&card->snd_card->controls_rwsem); fsl_xcvr_activate_ctl(dai, fsl_xcvr_arc_mode_kctl.name, (xcvr->mode =3D=3D FSL_XCVR_MODE_ARC)); fsl_xcvr_activate_ctl(dai, fsl_xcvr_earc_capds_kctl.name, (xcvr->mode =3D=3D FSL_XCVR_MODE_EARC)); + up_read(&card->snd_card->controls_rwsem); + /* Allow playback for SPDIF only */ rtd =3D snd_soc_get_pcm_runtime(card, card->dai_link); rtd->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream_count =3D --=20 2.34.1