linux-sg2042/sound/hda/ext
Takashi Iwai d7a181da2d ALSA: hda: Fix racy display power access
snd_hdac_display_power() doesn't handle the concurrent calls carefully
enough, and it may lead to the doubly get_power or put_power calls,
when a runtime PM and an async work get called in racy way.

This patch addresses it by reusing the bus->lock mutex that has been
used for protecting the link state change in ext bus code, so that it
can protect against racy display state changes.  The initialization of
bus->lock was moved from snd_hdac_ext_bus_init() to
snd_hdac_bus_init() as well accordingly.

Testcase: igt/i915_pm_rpm/module-reload #glk-dsi
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-04-10 15:23:36 +02:00
..
Makefile ALSA: hdac_ext: add extended stream capabilities 2015-06-11 11:59:22 +02:00
hdac_ext_bus.c ALSA: hda: Fix racy display power access 2019-04-10 15:23:36 +02:00
hdac_ext_controller.c ALSA: hda: Fix mismatch for register mask and value in ext controller. 2018-10-02 17:10:48 +02:00
hdac_ext_stream.c ALSA: hda: Fix several mismatch for register mask and value 2018-09-03 23:47:40 +02:00