]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Fix concurrent hash accesses
authorTakashi Iwai <tiwai@suse.de>
Thu, 10 May 2012 14:11:15 +0000 (16:11 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 10 May 2012 14:12:13 +0000 (16:12 +0200)
commit156ac7f0a72b49e7280879fb4c1908e9f27f846d
tree42202b40e340567e58feeeeeaf680c58c71d0196
parent99565a7d9e757482f7f0fffda33fcf4069eeb354
ALSA: hda - Fix concurrent hash accesses

The amp and caps hashes aren't protected properly for concurrent
accesses.  Protect them via a new mutex now.

But it can't be so simple as originally thought: since the update of a
hash table entry itself might trigger the power-up sequence which
again accesses the hash table, we can't cover the whole function
simply via mutex.  Thus the update part has to be split from the mutex
and revalidated.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.h