linux/sound/hda
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
..
ext ALSA: hda: Fix racy display power access 2019-04-10 15:23:36 +02:00
array.c ALSA: hda: Fix krealloc() with __GFP_ZERO usage 2016-08-03 15:17:22 +02:00
hda_bus_type.c ALSA: hda - Advertise MODALIAS in uevent 2015-10-20 10:15:53 +02:00
hdac_bus.c ALSA: hda: Fix racy display power access 2019-04-10 15:23:36 +02:00
hdac_component.c ALSA: hda: Fix racy display power access 2019-04-10 15:23:36 +02:00
hdac_controller.c ALSA: hda: Fix mismatches for register mask and value in hdac controller 2019-01-09 10:28:44 +01:00
hdac_device.c ALSA: hda: Refactor display power management 2018-12-11 08:06:55 +01:00
hdac_i915.c ALSA: hda: Extend i915 component bind timeout 2019-02-25 16:59:02 +01:00
hdac_regmap.c regmap: split up regmap_config.use_single_rw 2018-09-07 13:03:55 +01:00
hdac_stream.c ALSA: hda: Avoid NULL pointer dereference at snd_hdac_stream_start() 2019-03-13 11:23:59 +01:00
hdac_sysfs.c ASoC: Updates for v4.15 2017-11-13 15:45:57 +01:00
hdmi_chmap.c ALSA: hda: Fix too short HDMI/DP chmap reporting 2017-11-17 12:20:37 +01:00
Kconfig ALSA: hda: Make audio component support more generic 2018-07-17 22:25:48 +02:00
local.h ASoC: Updates for v4.15 2017-11-13 15:45:57 +01:00
Makefile ALSA: hda: Make audio component support more generic 2018-07-17 22:25:48 +02:00
trace.c ALSA: hda - Re-add tracepoints to HD-audio core driver 2015-03-23 13:17:58 +01:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00