diff options
author | Takashi Iwai | 2019-10-29 21:41:20 +0100 |
---|---|---|
committer | Takashi Iwai | 2019-10-30 15:32:37 +0100 |
commit | 302d5a80d232134246032bc4263fd7facdddb8f1 (patch) | |
tree | b36a354c7572ab6773c0f19c968044af9955eed6 /sound/core/timer.c | |
parent | 1a7f60b9df614bb36d14dc0c0bc898a31b2b506f (diff) |
ALSA: hda - Fix mutex deadlock in HDMI codec driver
The commit ade49db337a9 ("ALSA: hda/hdmi - Allow audio component for
AMD/ATI and Nvidia HDMI") introduced the spec->pcm_lock mutex lock to
the whole generic_hdmi_init() function for avoiding the race with the
audio component registration. However, this caused a dead lock when
the unsolicited event is handled without the audio component, as the
codec gets runtime-resumed in hdmi_present_sense() which is already
inside the spec->pcm_lock in its caller.
For avoiding this deadlock, add a new mutex only for the audio
component binding that is used in both generic_hdmi_init() and the
audio notifier registration where the jack callbacks are handled /
re-registered.
Fixes: ade49db337a9 ("ALSA: hda/hdmi - Allow audio component for AMD/ATI and Nvidia HDMI")
Reported-and-tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://lore.kernel.org/r/s5himo7i89i.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/timer.c')
0 files changed, 0 insertions, 0 deletions