linux/sound
Takashi Iwai eb8d0eaaf8 ALSA: hda: Fix potential race at unregistration and unsol events
When the codec device is unregistered / freed, it may release the
resource while being used in an unsolicited event like the jack
detection work.  This leads to use-after-free.

The fix here is to unregister the device at first, i.e. removing the
codec from the list, then flushing the pending works to assure that
all unsol events are gone.  After this point, we're free from
accessing the codec via unsol events, thus can release the resources
gracefully.

The issue was spotted originally by Intel CI, but it couldn't be
reproduced reliably by its nature.  So let's hope this fix really
addresses the whole issues.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196045
Reported-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-20 07:53:57 +02:00
..
aoa ALSA: declare snd_kcontrol_new structures as const 2017-05-30 10:29:25 +02:00
arm ALSA: arm: Fix empty menuconfig SND_ARM 2016-08-01 16:07:53 +02:00
atmel ALSA: atmel: Remove AVR32 bits from the driver 2017-05-15 17:07:00 +02:00
core Merge branch 'for-linus' into for-next 2017-06-20 07:53:07 +02:00
drivers ALSA: seq: Allow the modular sequencer registration 2017-06-12 08:43:33 +02:00
firewire Merge branch 'for-linus' into for-next 2017-06-20 07:53:07 +02:00
hda ALSA: hda: Fix potential race at unregistration and unsol events 2017-06-20 07:53:57 +02:00
i2c ALSA: ak411x: Use array instead of offsetof() 2017-05-17 07:13:03 +02:00
isa ALSA: seq: Allow the modular sequencer registration 2017-06-12 08:43:33 +02:00
mips ALSA: hal2: switch to dma_alloc_attrs 2017-06-16 11:10:05 +02:00
oss Annotate hardware config module parameters in sound/oss/ 2017-04-20 12:02:32 +01:00
parisc ALSA: parisc: Constify hw_constraints 2017-06-09 10:42:48 +02:00
pci ALSA: hda - Add AZX_DRIVER_SKL for simplification 2017-06-20 07:53:28 +02:00
pcmcia ALSA: declare snd_kcontrol_new structures as const 2017-05-30 10:29:25 +02:00
ppc ALSA: declare snd_kcontrol_new structures as const 2017-05-30 10:29:25 +02:00
sh ALSA: sh: Convert to the new PCM ops 2017-06-02 19:38:03 +02:00
soc Merge branch 'for-linus' into for-next 2017-06-07 10:25:30 +02:00
sparc ALSA: sparc: Constify hw_constraints 2017-06-09 10:42:56 +02:00
spi
synth ALSA: synth: Select snd-emux-synth explicitly 2017-06-09 22:10:06 +02:00
usb ALSA: line6: remove unnecessary initialization to PODHD500X 2017-06-20 07:51:22 +02:00
x86 drm/i915: Fix runtime PM for LPE audio 2017-05-15 14:44:11 +03:00
Kconfig ALSA: synth: Select snd-emux-synth explicitly 2017-06-09 22:10:06 +02:00
Makefile ALSA: add Intel HDMI LPE audio driver for BYT/CHT-T 2017-01-25 14:23:46 +01:00
ac97_bus.c
last.c
sound_core.c