diff --git a/patches.kernel.org/6.2.12-004-ALSA-emu10k1-fix-capture-interrupt-handler-unl.patch b/patches.kernel.org/6.2.12-004-ALSA-emu10k1-fix-capture-interrupt-handler-unl.patch new file mode 100644 index 0000000..5618c6d --- /dev/null +++ b/patches.kernel.org/6.2.12-004-ALSA-emu10k1-fix-capture-interrupt-handler-unl.patch @@ -0,0 +1,55 @@ +From: Oswald Buddenhagen +Date: Wed, 5 Apr 2023 22:12:20 +0200 +Subject: [PATCH] ALSA: emu10k1: fix capture interrupt handler unlinking +References: bsc#1012628 +Patch-mainline: 6.2.12 +Git-commit: b09c551c77c7e01dc6e4f3c8bf06b5ffa7b06db5 + +commit b09c551c77c7e01dc6e4f3c8bf06b5ffa7b06db5 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: Oswald Buddenhagen +Cc: +Link: https://lore.kernel.org/r/20230405201220.2197923-1-oswald.buddenhagen@gmx.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Jiri Slaby +--- + sound/pci/emu10k1/emupcm.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c +index 48af77ae..908f76f1 100644 +--- a/sound/pci/emu10k1/emupcm.c ++++ b/sound/pci/emu10k1/emupcm.c +@@ -1236,7 +1236,7 @@ static int snd_emu10k1_capture_mic_close(struct snd_pcm_substream *substream) + { + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + +- emu->capture_interrupt = NULL; ++ emu->capture_mic_interrupt = NULL; + emu->pcm_capture_mic_substream = NULL; + return 0; + } +@@ -1344,7 +1344,7 @@ static int snd_emu10k1_capture_efx_close(struct snd_pcm_substream *substream) + { + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + +- emu->capture_interrupt = NULL; ++ emu->capture_efx_interrupt = NULL; + emu->pcm_capture_efx_substream = NULL; + return 0; + } +-- +2.35.3 + diff --git a/series.conf b/series.conf index 2bc47b1..bf7debb 100644 --- a/series.conf +++ b/series.conf @@ -2231,6 +2231,7 @@ patches.kernel.org/6.2.12-001-Revert-pinctrl-amd-Disable-and-mask-interrupts.patch patches.kernel.org/6.2.12-002-drm-amd-display-Pass-the-right-info-to-drm_dp_.patch patches.kernel.org/6.2.12-003-drm-i915-Workaround-ICL-CSC_MODE-sticky-arming.patch + patches.kernel.org/6.2.12-004-ALSA-emu10k1-fix-capture-interrupt-handler-unl.patch ######################################################## # Build fixes that apply to the vanilla kernel too.