]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: fsl_xcvr: fix missing lock in fsl_xcvr_mode_put()
authorZiyi Guo <n7l8m4@u.northwestern.edu>
Mon, 2 Feb 2026 17:41:12 +0000 (17:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Feb 2026 15:31:34 +0000 (16:31 +0100)
commitcab928242853a832ffa7efda270ecfb9efeebb6e
treee510cea6ba90ac0062d9d36887ab3092feb4fa6f
parent00c57e2369386e244de92db0d58548cea574fedd
ASoC: fsl_xcvr: fix missing lock in fsl_xcvr_mode_put()

[ Upstream commit f514248727606b9087bc38a284ff686e0093abf1 ]

fsl_xcvr_activate_ctl() has
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 <n7l8m4@u.northwestern.edu>
Link: https://patch.msgid.link/20260202174112.2018402-1-n7l8m4@u.northwestern.edu
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/fsl/fsl_xcvr.c