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>
This commit is contained in:
Amadeusz Sławiński 2019-05-13 11:18:01 +02:00 • committed by Takashi Iwai
commit ed180abba7
3 changed files with 11 additions and 0 deletions