Commit 9a92ed04 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen Committed by sanglipeng
Browse files

ALSA: emu10k1: fix capture interrupt handler unlinking

stable inclusion
from stable-v5.10.178
commit df4af0ddf7f0e22ed0ceb8dec222bb96c88af98d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8D927

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=df4af0ddf7f0e22ed0ceb8dec222bb96c88af98d



--------------------------------

commit b09c551c upstream.

Due to two copy/pastos, closing the MIC or EFX capture device would
make a running ADC capture hang due to unsetting its interrupt handler.
In principle, this would have also allowed dereferencing dangling
pointers, but we're actually rather thorough at disabling and flushing
the ints.

While it may sound like one, this actually wasn't a hypothetical bug:
PortAudio will open a capture stream at startup (and close it right
away) even if not asked to. If the first device is busy, it will just
proceed with the next one ... thus killing a concurrent capture.

Signed-off-by: default avatarOswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230405201220.2197923-1-oswald.buddenhagen@gmx.de


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 5faf7dde
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment