]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ALSA: timer: Fix race at concurrent reads
authorTakashi Iwai <tiwai@suse.de>
Mon, 8 Feb 2016 16:26:58 +0000 (17:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Feb 2016 20:31:00 +0000 (12:31 -0800)
commit925249d5172a31d7d430fdf364fc9229223c7942
treeeb83232c7dbdb3521a51eae640759c406d676861
parentce60478a9959a8e1d1dcc70325e72678e78d85c5
ALSA: timer: Fix race at concurrent reads

commit 4dff5c7b7093b19c19d3a100f8a3ad87cb7cd9e7 upstream.

snd_timer_user_read() has a potential race among parallel reads, as
qhead and qused are updated outside the critical section due to
copy_to_user() calls.  Move them into the critical section, and also
sanitize the relevant code a bit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/timer.c