WSL2-Linux-Kernel/sound/isa
Takashi Iwai 1c2b951915 ALSA: sb: Fix potential ABBA deadlock in CSP driver
SB16 CSP driver may hit potentially a typical ABBA deadlock in two
code paths:

 In snd_sb_csp_stop():
     spin_lock_irqsave(&p->chip->mixer_lock, flags);
     spin_lock(&p->chip->reg_lock);

 In snd_sb_csp_load():
     spin_lock_irqsave(&p->chip->reg_lock, flags);
     spin_lock(&p->chip->mixer_lock);

Also the similar pattern is seen in snd_sb_csp_start().

Although the practical impact is very small (those states aren't
triggered in the same running state and this happens only on a real
hardware, decades old ISA sound boards -- which must be very difficult
to find nowadays), it's a real scenario and has to be fixed.

This patch addresses those deadlocks by splitting the locks in
snd_sb_csp_start() and snd_sb_csp_stop() for avoiding the nested
locks.

Reported-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/7b0fcdaf-cd4f-4728-2eae-48c151a92e10@gmail.com
Link: https://lore.kernel.org/r/20210716132723.13216-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-17 09:55:10 +02:00
..
ad1816a ALSA: ad1816a: Fix assignment in if condition 2021-06-09 17:29:41 +02:00
ad1848 module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
cs423x ALSA: cs423x: Fix assignment in if condition 2021-06-09 17:29:43 +02:00
es1688 ALSA: isa: Fix assignment in if condition 2021-06-09 17:29:48 +02:00
galaxy isa: Make the remove callback for isa drivers return void 2021-01-26 07:42:27 +01:00
gus ASoC: Fixes for v5.13 2021-06-24 10:02:45 +02:00
msnd isa: Make the remove callback for isa drivers return void 2021-01-26 07:42:27 +01:00
opti9xx ALSA: opti9xx: Fix assignment in if condition 2021-06-09 17:29:44 +02:00
sb ALSA: sb: Fix potential ABBA deadlock in CSP driver 2021-07-17 09:55:10 +02:00
wavefront ALSA: wavefront: Fix assignment in if condition 2021-06-09 17:29:42 +02:00
wss ALSA: isa: Fix assignment in if condition 2021-06-09 17:29:48 +02:00
Kconfig sound: Fix Kconfig indentation 2019-10-07 03:53:03 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
adlib.c isa: Make the remove callback for isa drivers return void 2021-01-26 07:42:27 +01:00
als100.c ALSA: als100: Fix assignment in if condition 2021-06-09 17:29:47 +02:00
azt2320.c ALSA: azt2320: Fix assignment in if condition 2021-06-09 17:29:47 +02:00
cmi8328.c isa: Make the remove callback for isa drivers return void 2021-01-26 07:42:27 +01:00
cmi8330.c ALSA: isa: Fix error return code in snd_cmi8330_probe() 2021-07-07 13:26:19 +02:00
es18xx.c ALSA: es18xx: Fix assignment in if condition 2021-06-09 17:29:45 +02:00
opl3sa2.c ALSA: opl3sa2: Fix assignment in if condition 2021-06-09 17:29:45 +02:00
sc6000.c module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
sscape.c isa: Make the remove callback for isa drivers return void 2021-01-26 07:42:27 +01:00