ALSA: emu10k1: fix capture interrupt handler unlinking
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>
Wed, 5 Apr 2023 20:12:20 +0000 (22:12 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 6 Apr 2023 06:11:49 +0000 (08:11 +0200)
commitb09c551c77c7e01dc6e4f3c8bf06b5ffa7b06db5
tree3d6768ecc5a779c2f404d1b8a37886624fe256eb
parentf342ac00da1064eb4f94b1f4bcacbdfea955797a
ALSA: emu10k1: fix capture interrupt handler unlinking

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: Oswald 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: Takashi Iwai <tiwai@suse.de>
sound/pci/emu10k1/emupcm.c