]> git.ipfire.org Git - thirdparty/kernel/stable.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>
Fri, 19 Feb 2016 22:28:32 +0000 (14:28 -0800)
commit975d3f3449f53f9caf9f52ea9669bf7cb93e07e5
tree1a72bf23fc0534133fd89de6886e9097636eb6eb
parentfe12db461a0302361d36013776f0e4f4bb9c0566
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