summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>2019-05-13 11:18:01 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-13 14:41:56 +0200
commited180abba7f1fc3cf04ffa27767b1bcc8e8c842a (patch)
tree5e740e02d4fd92f1721d12ef0a7b0012d76b54a8 /include/sound
parent891afcf2462d2cc4ef7caf94215358ca61fa32cb (diff)
ALSA: hda: Fix race between creating and refreshing sysfs entries
hda_widget_sysfs_reinit() can free underlying codec->widgets structure on which widget_tree_create() operates. Add locking to prevent such issues from happening. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110382 Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/hdaudio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index ca1d9a70d026..5a9315af2d37 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -81,6 +81,7 @@ struct hdac_device {
atomic_t in_pm; /* suspend/resume being performed */
/* sysfs */
+ struct mutex widget_lock;
struct hdac_widget_tree *widgets;
/* regmap */