acrn-kernel/sound/hda
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
..
ext ALSA: hda - add more ML register definitions 2017-04-07 10:39:18 +02:00
Kconfig
Makefile
array.c ALSA: hda: Fix krealloc() with __GFP_ZERO usage 2016-08-03 15:17:22 +02:00
hda_bus_type.c
hdac_bus.c ALSA: hda: Fix potential race at unregistration and unsol events 2017-06-20 07:53:57 +02:00
hdac_controller.c ALSA: hda: Fix cpu lockup when stopping the cmd dmas 2017-05-10 08:47:17 +02:00
hdac_device.c ALSA: hda: Fix potential race at unregistration and unsol events 2017-06-20 07:53:57 +02:00
hdac_i915.c drm/i915/dp: DP audio API changes for MST 2016-09-22 09:01:55 -07:00
hdac_regmap.c ALSA: hdac_regmap - fix the register access for runtime PM 2016-06-17 14:01:06 +02:00
hdac_stream.c ALSA: hda - Avoid tricky macros 2017-04-03 08:42:43 +02:00
hdac_sysfs.c
hdmi_chmap.c ALSA: hda: fix some klockwork scan warnings 2016-06-16 10:10:12 +02:00
local.h
trace.c
trace.h