diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-10-06 19:17:22 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-10-09 16:46:04 +0200 |
commit | 96e503f9000f2ad17d550cd884a5e386eb7f532f (patch) | |
tree | 560eba52b0a526645c0a2a24d181f19a8ed97b46 /include/drm | |
parent | 7dcd56123e312e8b17f85a597b33552a704ce45f (diff) | |
download | linux-next-96e503f9000f2ad17d550cd884a5e386eb7f532f.tar.gz |
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>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_audio_component.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/drm/drm_audio_component.h b/include/drm/drm_audio_component.h index a45f93487039..0d36bfd1a4cd 100644 --- a/include/drm/drm_audio_component.h +++ b/include/drm/drm_audio_component.h @@ -117,6 +117,10 @@ struct drm_audio_component { * @audio_ops: Ops implemented by hda driver, called by DRM driver */ const struct drm_audio_component_audio_ops *audio_ops; + /** + * @master_bind_complete: completion held during component master binding + */ + struct completion master_bind_complete; }; #endif /* _DRM_AUDIO_COMPONENT_H_ */ |