android_kernel_samsung_a7y1.../sound
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
..
aoa ALSA: aoa: onyx: always initialize register read value 2020-04-07 13:42:41 +02:00
arm A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atmel A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
core ALSA: seq: Fix concurrent access to queue current tick/time 2020-04-07 14:04:02 +02:00
drivers ALSA: dummy: Fix PCM format loop in proc output 2020-04-07 13:49:43 +02:00
firewire ALSA: isight: fix leak of reference to firewire unit in error path of .probe callback 2020-04-07 12:34:13 +02:00
hda Revert "ALSA: hda: Flush interrupts on disabling" 2020-04-07 09:28:46 +02:00
i2c ALSA: i2c/cs8427: Fix int to char conversion 2020-04-07 12:35:00 +02:00
isa ALSA: cs4236: fix error return comparison of an unsigned integer 2020-04-07 13:24:47 +02:00
mips A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
oss A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parisc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pci ALSA: hda - Add docking station support for Lenovo Thinkpad T420s 2020-04-07 13:57:04 +02:00
pcmcia A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ppc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sh ALSA: sh: Fix compile warning wrt const 2020-04-07 13:56:31 +02:00
soc ASoC: atmel: fix build error with CONFIG_SND_ATMEL_SOC_DMA=m 2020-04-07 13:56:44 +02:00
sparc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
synth A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usb ALSA: usx2y: Adjust indentation in snd_usX2Y_hwdep_dsp_status 2020-04-07 13:56:11 +02:00
ac97_bus.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
last.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sound_core.c sound: fix a memory leak bug 2020-04-06 20:38:13 +02:00
sound_firmware.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30