From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx-relay49-hz3.antispameurope.com (mx-relay49-hz3.antispameurope.com [94.100.134.238]) (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 634EC330662 for ; Tue, 10 Feb 2026 07:18:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=94.100.134.238 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770707943; cv=pass; b=uqBqC2forcS+B4IgRU0iPw6kIlc+j1VChNOblcaI5DG+WC6IvWy6T0UCO4BQF6IEzDRTsZ8vPKnQKfS3KxAagbV2Z1M1ktFR3kaBm08ZnBGxHIZDRhamFUqEb3niP0kL1RvS62Kk9L4oGp9woVJLBXgmoQiQ7SUEwSLrAFLal/I= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770707943; c=relaxed/simple; bh=MwZ2lkVillUybxEY1cC/HwW6MsPjMsur1kBiv1yRowE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pfENythDF/KmNTSpRYg0k+6cvCtwCM7pdyfWo0lMWSbdFH3RW9Mkap9yHu8HKYzeV+iOqKLv3LyvSwwRgKbjmA4WYblF9PMzI3goRTFEapJVF5YyfvL2A3/sNgtqRtl4rr33mWQgqhcGad3/2mNf0NWAQiJa3bk639TWbkGGgt4= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=TWEfGlxi; arc=pass smtp.client-ip=94.100.134.238 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="TWEfGlxi" ARC-Authentication-Results: i=1; mx-gate49-hz3.hornetsecurity.com 1; spf=pass reason=mailfrom (ip=94.100.132.6, headerfrom=ew.tq-group.com) smtp.mailfrom=ew.tq-group.com smtp.helo=smtp-out02-hz1.hornetsecurity.com; dmarc=pass header.from=ew.tq-group.com orig.disposition=pass ARC-Message-Signature: a=rsa-sha256; bh=pabMGLGGXLOcOo/Dpjkxu/cClFC72VFL87C8/t2PX84=; c=relaxed/relaxed; d=hornetsecurity.com; h=from:to:date:subject:mime-version:; i=1; s=hse1; t=1770707917; b=HwFQSwRrEYsJSow2NmtrF24ouaFvgUa4iJ9fK0tDFMSP3tcTo5W2AWqEpoqy6ory6b0qxqJu GQCSGoixQ2dnqxXxDXjFaieHjK/yGupkkWI9t1bIkzTMQXVm/+1EXVkgMD6wdKQ59rvLjJpMIAc lmcnmBrrRWKceeZAMaZlENPFcpWOdyhQB4ltukHNmbZqx+oMOvyt4JU5Xp1jf270Fwz1mSScoDk dl0841arIw8rhIH6YoJLUt3e+KbqcXErxxcPZqma2+4/BawBacXlfsMyGe5t2c2y6itZgPQnK4i fYyt9kPnAesWvKgLPCNiWNnj1Q8bBmfGl+2VA2cPzcNIQ== ARC-Seal: a=rsa-sha256; cv=none; d=hornetsecurity.com; i=1; s=hse1; t=1770707917; b=sCLtgGL9adxGj5DVSQnH9ZsGTkwwUAYKsx0ijaQVpAioUTkutB9E36aM+tWfEh7YT6IeB8Mh Rzhhv3HxLHeY6W5z48Z98Kh2ikHZmNzxTQTFVOagMeNJP7Q8DkqmanChrG1z+qAGXM5eH07YPC+ 0SD7EypM6SEsU7z+xJaGKF+GOTCfUt42uBwRfb/xti6M9XIjJyb+BzgXk/VFbOm0BKl8E5BJcs1 O/vikT4TfQaZRczR8sDGBFJyPSiNIcU22OhjBAS9YTx3e+S0zbpPElO2ImVUyGrMAciaH0Et5lX MfqQNwcNY/R/PUQPEm3JrmBM7YJPQ682SfjE3sV9m/JJA== Received: from he-nlb01-hz1.hornetsecurity.com ([94.100.132.6]) by mx-relay49-hz3.antispameurope.com; Tue, 10 Feb 2026 08:18:37 +0100 Received: from steina-w.localnet (host-82-135-125-110.customer.m-online.net [82.135.125.110]) (Authenticated sender: alexander.stein@ew.tq-group.com) by smtp-out02-hz1.hornetsecurity.com (Postfix) with ESMTPSA id 59A1B5A3119; Tue, 10 Feb 2026 08:18:27 +0100 (CET) From: Alexander Stein To: Shengjiu Wang , Xiubo Li , Ziyi Guo 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: Re: [PATCH] ASoC: fsl_xcvr: fix missing lock in fsl_xcvr_mode_put() Date: Tue, 10 Feb 2026 08:18:26 +0100 Message-ID: <5056506.GXAFRqVoOG@steina-w> Organization: TQ-Systems GmbH In-Reply-To: <20260202174112.2018402-1-n7l8m4@u.northwestern.edu> References: <20260202174112.2018402-1-n7l8m4@u.northwestern.edu> 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="iso-8859-1" X-cloud-security-sender:alexander.stein@ew.tq-group.com X-cloud-security-recipient:linux-kernel@vger.kernel.org X-cloud-security-crypt: load encryption module X-cloud-security-Mailarchiv: E-Mail archived for: alexander.stein@ew.tq-group.com X-cloud-security-Mailarchivtype:outbound X-cloud-security-Virusscan:CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mx-relay49-hz3.antispameurope.com with 4f9Cb80s0Mz3ybFB X-cloud-security-connect: he-nlb01-hz1.hornetsecurity.com[94.100.132.6], TLS=1, IP=94.100.132.6 X-cloud-security-Digest:f91bf45b2c1e1e4dad7653f0d57fe9b6 X-cloud-security:scantime:2.062 DKIM-Signature: a=rsa-sha256; bh=pabMGLGGXLOcOo/Dpjkxu/cClFC72VFL87C8/t2PX84=; c=relaxed/relaxed; d=ew.tq-group.com; h=content-type:mime-version:subject:from:to:message-id:date; s=hse1; t=1770707916; v=1; b=TWEfGlxifaaldna36cR5ZRLL2O7KtrCVPei14c/a/yozqoxy0Tcq3SN8wQSJmBubJmEtyWCC WOb7pd7nPnYUQx8uFPcXuh8DhXAiIyLwZSamXqQnoVKo4DmsaiAVbX1dgg8r3ioGwg826TSq42c CFgWZI5oERyR02EBJdsWEWKsf1Sda4DHB45tLAh6cEBAgmwK7y70Ax4a+aWKE4MgTVdP79eS848 e/zZa7ma/HIzbqlgVXjNny7Jxo6plWZwj96DYT/b49N4eH3TB5J/TrjDO2YH0rDjT9n3emaNE0Q 3vHQUdbhpwDuBYC8gxXff2LZ96XIkJxE7j7MWPE7qd8GQ== Hi, Am Montag, 2. Februar 2026, 18:41:12 CET schrieb Ziyi Guo: > 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. >=20 > Other callers of fsl_xcvr_activate_ctl() in fsl_xcvr_startup() and > fsl_xcvr_shutdown() properly acquire the lock with down_read()/up_read(). >=20 > 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. >=20 > Signed-off-by: Ziyi Guo > --- > sound/soc/fsl/fsl_xcvr.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > 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 *k= control, > =20 > xcvr->mode =3D snd_soc_enum_item_to_val(e, item[0]); > =20 > + down_read(&card->snd_card->controls_rwsem); This lock causes a blocked task on my TQMa8MPxL based board: INFO: task alsactl:1969 blocked for more than 120 seconds. Tainted: G W 6.19.0-next-20260209+ #3331 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:alsactl state:D stack:0 pid:1969 tgid:1969 ppid:1 t= ask_flags:0x400100 flags:0x00000a01 Call trace: __switch_to+0xdc/0x120 (T) __schedule+0x258/0x790 schedule+0x30/0xb0 schedule_preempt_disabled+0x20/0x40 rwsem_down_read_slowpath+0x214/0x68c down_read+0xb0/0xb8 fsl_xcvr_mode_put+0x4c/0xc0 [snd_soc_fsl_xcvr ac1b31380c6a6ea0d613bd5f7848= 9e314a40f91f] snd_ctl_elem_write+0xdc/0x180 [snd 852e63996474051c57bcd1a86ebfd8108307385= 3] snd_ctl_ioctl+0x7a4/0xaec [snd 852e63996474051c57bcd1a86ebfd81083073853] __arm64_sys_ioctl+0x9c/0xe4 invoke_syscall.constprop.0+0x58/0xcc el0_svc_common.constprop.0+0xac/0xd4 do_el0_svc+0x18/0x20 el0_svc+0x24/0xa0 el0t_64_sync_handler+0x98/0xdc el0t_64_sync+0x154/0x158 INFO: task alsactl:1969 blocked on an rw-semaphore likely owned by= task alsactl:1969 Best regards, Alexander > 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 =2D-=20 TQ-Systems GmbH | M=FChlstra=DFe 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht M=FCnchen, HRB 105018 Gesch=E4ftsf=FChrer: Detlef Schneider, R=FCdiger Stahl, Stefan Schneider http://www.tq-group.com/