mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
222bde0388
The recent change in HD-audio HDMI/DP codec driver for allowing the
dynamic PCM binding introduced a new spec->pcm_mutex. One of the
protected area by this mutex is hdmi_present_sense(). As reported by
Intel CI tests, unfortunately, the new mutex causes a deadlock when
the hotplug/unplug is triggered during the codec is in runtime
suspend. The buggy code path is like the following:
hdmi_unsol_event() -> ...
-> hdmi_present_sense()
==> ** here taking pcm_mutex
-> hdmi_present_sense_via_verbs()
-> snd_hda_power_up_pm() -> ... (runtime resume calls)
-> generic_hdmi_resume()
-> hdmi_present_sense()
==> ** here taking pcm_mutex again!
As we can see here, the problem is that the mutex is taken before
snd_hda_power_up_pm() call that triggers the runtime resume. That is,
the obvious solution is to move the power up/down call outside the
mutex; it is exactly what this patch provides.
The patch also clarifies why this bug wasn't caught beforehand. We
used to have the i915 audio component for hotplug for all Intel chips,
and in that code path, there is no power up required but the
information is taken directly from the graphics side. However, we
recently switched back to the old method for some old Intel chips due
to regressions, and now the deadlock issue is surfaced.
Fixes:
|
||
---|---|---|
.. | ||
aoa | ||
arm | ||
atmel | ||
core | ||
drivers | ||
firewire | ||
hda | ||
i2c | ||
isa | ||
mips | ||
oss | ||
parisc | ||
pci | ||
pcmcia | ||
ppc | ||
sh | ||
soc | ||
sparc | ||
spi | ||
synth | ||
usb | ||
ac97_bus.c | ||
Kconfig | ||
last.c | ||
Makefile | ||
sound_core.c | ||
sound_firmware.c |