diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-05-16 08:25:56 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-05-16 08:27:11 +0200 |
commit | c637fa151259c0f74665fde7cba5b7eac1417ae5 (patch) | |
tree | 21ad2119571d846a01fa103eb8505e447210cdab /Documentation/firmware-guide | |
parent | 10ce77e4817fef99e1166be7e6685a80c63bf77f (diff) | |
download | linux-stable-c637fa151259c0f74665fde7cba5b7eac1417ae5.tar.gz linux-stable-c637fa151259c0f74665fde7cba5b7eac1417ae5.tar.bz2 linux-stable-c637fa151259c0f74665fde7cba5b7eac1417ae5.zip |
ALSA: hda: Fix potential race in unsol event handler
The unsol event handling code has a loop retrieving the read/write
indices and the arrays without locking while the append to the array
may happen concurrently. This may lead to some inconsistency.
Although there hasn't been any proof of this bad results, it's still
safer to protect the racy accesses.
This patch adds the spinlock protection around the unsol handling loop
for addressing it. Here we take bus->reg_lock as the writer side
snd_hdac_bus_queue_event() is also protected by that lock.
Link: https://lore.kernel.org/r/20200516062556.30951-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'Documentation/firmware-guide')
0 files changed, 0 insertions, 0 deletions