diff options
author | Takashi Iwai <[email protected]> | 2021-07-16 15:27:23 +0200 |
---|---|---|
committer | Takashi Iwai <[email protected]> | 2021-07-17 09:55:10 +0200 |
commit | 1c2b9519159b470ef24b2638f4794e86e2952ab7 (patch) | |
tree | 9733fefee4023bb0ed3910d81a0a95635c47399e /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | 64752a95b702817602d72f109ceaf5ec0780e283 (diff) |
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 <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions