ALSA: hda/i915 - fix list corruption with concurrent probes
authorTakashi Iwai <tiwai@suse.de>
Tue, 6 Oct 2020 16:17:22 +0000 (19:17 +0300)
committerTakashi Iwai <tiwai@suse.de>
Fri, 9 Oct 2020 14:46:04 +0000 (16:46 +0200)
commit96e503f9000f2ad17d550cd884a5e386eb7f532f
tree560eba52b0a526645c0a2a24d181f19a8ed97b46
parent7dcd56123e312e8b17f85a597b33552a704ce45f
ALSA: hda/i915 - fix list corruption with concurrent probes

Current hdac_i915 uses a static completion instance to wait
for i915 driver to complete the component bind.

This design is not safe if multiple HDA controllers are active and
communicating with different i915 instances, and can lead to list
corruption and failed audio driver probe.

Fix the design by moving completion mechanism to common acomp
code and remove the related code from hdac_i915.

Fixes: 7b882fe3e3e8 ("ALSA: hda - handle multiple i915 device instances")
Co-developed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20201006161722.500256-1-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/drm/drm_audio_component.h
sound/hda/hdac_component.c
sound/hda/hdac_i915.c