kernel-fxtec-pro1x/sound
Takashi Iwai 5a2972600a 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 16:39:00 +01:00
..
ac97
aoa ALSA: aoa: onyx: always initialize register read value 2020-01-27 14:51:02 +01:00
arm
atmel
core ALSA: seq: Fix concurrent access to queue current tick/time 2020-02-28 16:39:00 +01:00
drivers ALSA: dummy: Fix PCM format loop in proc output 2020-02-11 04:33:56 -08:00
firewire ALSA: dice: fix fallback from protocol extension into limited functionality 2020-01-23 08:21:28 +01:00
hda ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs 2020-02-28 16:38:43 +01:00
i2c ALSA: i2c/cs8427: Fix int to char conversion 2019-12-01 09:16:36 +01:00
isa ALSA: cs4236: fix error return comparison of an unsigned integer 2020-01-09 10:19:02 +01:00
mips
oss
parisc
pci ALSA: hda/realtek - Apply quirk for yet another MSI laptop 2020-02-28 16:38:44 +01:00
pcmcia
ppc
sh ALSA: sh: Fix compile warning wrt const 2020-02-24 08:34:45 +01:00
soc ASoC: sun8i-codec: Fix setting DAI data format 2020-02-28 16:38:44 +01:00
sparc
spi
synth
usb ALSA: usx2y: Adjust indentation in snd_usX2Y_hwdep_dsp_status 2020-02-24 08:34:42 +01:00
x86
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c