exynos-linux-stable/sound
Takashi Iwai 7bd1fc7826 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-02-28 15:42:56 +01:00
..
aoa ALSA: aoa: onyx: always initialize register read value 2020-01-29 10:24:29 +01:00
arm ALSA: arm: Fix empty menuconfig SND_ARM 2016-08-01 16:07:53 +02:00
atmel
core ALSA: seq: Fix concurrent access to queue current tick/time 2020-02-28 15:42:56 +01:00
drivers ALSA: dummy: Fix PCM format loop in proc output 2020-02-14 16:31:00 -05:00
firewire ALSA: isight: fix leak of reference to firewire unit in error path of .probe callback 2019-11-28 18:28:13 +01:00
hda ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs 2020-02-28 15:42:10 +01:00
i2c ALSA: i2c/cs8427: Fix int to char conversion 2019-11-28 18:28:29 +01:00
isa ALSA: cs4236: fix error return comparison of an unsigned integer 2020-01-12 11:24:15 +01:00
mips ALSA: Remove deprecated AU1X00 AC97 driver 2016-02-08 08:17:15 +01:00
oss sound: oss: Use kernel_read_file_from_path() for mod_firmware_load() 2016-07-26 10:38:03 +02:00
parisc
pci ALSA: hda - Add docking station support for Lenovo Thinkpad T420s 2020-02-28 15:42:37 +01:00
pcmcia ALSA: vxpocket: Fix invalid endian conversions 2018-08-22 07:47:14 +02:00
ppc powerpc updates for 4.9 2016-10-07 20:19:31 -07:00
sh ALSA: sh: Fix compile warning wrt const 2020-02-28 15:42:29 +01:00
soc ASoC: atmel: fix build error with CONFIG_SND_ATMEL_SOC_DMA=m 2020-02-28 15:42:31 +01:00
sparc ALSA: sparc: Fix invalid snd_free_pages() at error path 2018-12-05 19:42:40 +01:00
spi ALSA: at73c213: manage SSC clock 2016-01-20 09:59:27 +01:00
synth ALSA: emux: Fix potential Spectre v1 vulnerabilities 2019-01-09 16:16:42 +01:00
usb ALSA: usx2y: Adjust indentation in snd_usX2Y_hwdep_dsp_status 2020-02-28 15:42:25 +01:00
ac97_bus.c
Kconfig
last.c
Makefile sound: oss: Use kernel_read_file_from_path() for mod_firmware_load() 2016-07-26 10:38:03 +02:00
sound_core.c sound: fix a memory leak bug 2019-08-25 10:51:18 +02:00