diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-02-01 17:24:02 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-02-03 17:35:07 +0100 |
commit | 8f8d1d7fe009c320d80ed1c7b0c1d3d48b538965 (patch) | |
tree | 5251eead3e47c2c1e1a042fcb8aa73ba5eb2339c /sound/x86/intel_hdmi_audio.h | |
parent | ALSA: x86: Remove superfluous irqsave flags (diff) | |
download | linux-8f8d1d7fe009c320d80ed1c7b0c1d3d48b538965.tar.xz linux-8f8d1d7fe009c320d80ed1c7b0c1d3d48b538965.zip |
ALSA: x86: Fix racy access to chmap
The access to chmap can be racy against the hotplug process, where it
recreates the chmap on the fly. For protecting against it, a mutex is
introduced in this patch. It's also used for protecting the change /
reference of eld and state fields, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86/intel_hdmi_audio.h')
-rw-r--r-- | sound/x86/intel_hdmi_audio.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/x86/intel_hdmi_audio.h b/sound/x86/intel_hdmi_audio.h index 8b85a5668d83..be24682e3946 100644 --- a/sound/x86/intel_hdmi_audio.h +++ b/sound/x86/intel_hdmi_audio.h @@ -139,6 +139,7 @@ struct snd_intelhad { void __iomem *mmio_start; unsigned int had_config_offset; struct work_struct hdmi_audio_wq; + struct mutex mutex; /* for protecting chmap, state and eld */ }; #endif /* _INTEL_HDMI_AUDIO_ */ |