android_kernel_samsung_a7y1.../sound/core
Takashi Iwai ffe62fcb49 ALSA: seq: Fix concurrent access to queue current tick/time
commit dc7497795e014d84699c3b8809ed6df35352dd74 upstream.

snd_seq_check_queue() passes the current tick and time of the given
queue as a pointer to snd_seq_prioq_cell_out(), but those might be
updated concurrently by the seq timer update.

Fix it by retrieving the current tick and time via the proper helper
functions at first, and pass those values to snd_seq_prioq_cell_out()
later in the loops.

snd_seq_timer_get_cur_time() takes a new argument and adjusts with the
current system time only when it's requested so; this update isn't
needed for snd_seq_check_queue(), as it's called either from the
interrupt handler or right after queuing.

Also, snd_seq_timer_get_cur_tick() is changed to read the value in the
spinlock for the concurrency, too.

Reported-by: syzbot+fd5e0eaa1a32999173b2@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20200214111316.26939-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 14:04:02 +02:00
..
oss ALSA: pcm: oss: Avoid potential buffer overflows 2020-04-07 12:45:42 +02:00
seq ALSA: seq: Fix concurrent access to queue current tick/time 2020-04-07 14:04:02 +02:00
compress_offload.c ASoC: compress: fix unsigned integer overflow check 2020-04-07 12:40:07 +02:00
control_compat.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
control.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ctljack.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
device.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hrtimer.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hwdep_compat.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hwdep.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
info_oss.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
info.c ALSA: info: Fix racy addition/deletion of nodes 2020-04-06 15:57:17 +02:00
init.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
isadma.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
jack.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
memalloc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
memory.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
misc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pcm_compat.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pcm_dmaengine.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pcm_drm_eld.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pcm_iec958.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pcm_lib.c ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed() 2020-04-07 12:44:08 +02:00
pcm_memory.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pcm_misc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pcm_native.c ALSA: pcm: Add missing copy ops check before clearing buffer 2020-04-07 13:45:19 +02:00
pcm_timer.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pcm_trace.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pcm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rawmidi_compat.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rawmidi.c ALSA: rawmidi: Fix potential Spectre v1 vulnerability 2020-04-06 13:00:54 +02:00
rtctimer.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sgbuf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sound_oss.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sound.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
timer_compat.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
timer.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vmaster.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30