summaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-02-09 12:02:32 +0100
committerJiri Slaby <jslaby@suse.cz>2016-02-15 17:07:54 +0100
commitaa482b4ddf287095641a49f0343aff8f161c67c2 (patch)
treee96a8c08327781e31ed7cfdddf632e69b23a7a7b /sound/pci
parent009e4dbe919bfd67f9ce7800885a34008d730982 (diff)
downloadlwn-aa482b4ddf287095641a49f0343aff8f161c67c2.tar.gz
lwn-aa482b4ddf287095641a49f0343aff8f161c67c2.zip
ALSA: timer: Fix race between stop and interrupt
commit ed8b1d6d2c741ab26d60d499d7fbb7ac801f0f51 upstream. A slave timer element also unlinks at snd_timer_stop() but it takes only slave_active_lock. When a slave is assigned to a master, however, this may become a race against the master's interrupt handling, eventually resulting in a list corruption. The actual bug could be seen with a syzkaller fuzzer test case in BugLink below. As a fix, we need to take timeri->timer->lock when timer isn't NULL, i.e. assigned to a master, while the assignment to a master itself is protected by slave_active_lock. BugLink: http://lkml.kernel.org/r/CACT4Y+Y_Bm+7epAb=8Wi=AaWd+DYS7qawX52qxdCfOfY49vozQ@mail.gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'sound/pci')
0 files changed, 0 insertions, 0 deletions