linux-stable/sound/core
Takashi Iwai fb05e983ea ALSA: rawmidi: Access runtime->avail always in spinlock
commit 88a06d6fd6 upstream.

The runtime->avail field may be accessed concurrently while some
places refer to it without taking the runtime->lock spinlock, as
detected by KCSAN.  Usually this isn't a big problem, but for
consistency and safety, we should take the spinlock at each place
referencing this field.

Reported-by: syzbot+a23a6f1215c84756577c@syzkaller.appspotmail.com
Reported-by: syzbot+3d367d1df1d2b67f5c19@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20201206083527.21163-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-06 14:56:52 +01:00
..
oss ALSA: pcm: oss: Fix a few more UBSAN fixes 2020-12-30 11:54:07 +01:00
seq ALSA: seq: Use bool for snd_seq_queue internal flags 2021-01-06 14:56:52 +01:00
compress_offload.c ALSA: compress_offload: remove redundant initialization 2020-09-03 09:26:27 +02:00
control.c ALSA: ctl: fix error path at adding user-defined element set 2020-11-13 11:33:55 +01:00
control_compat.c ALSA: compat_ioctl: avoid compat_alloc_user_space 2020-09-21 10:37:07 +02:00
ctljack.c
device.c ALSA: core: Add snd_device_get_state() helper 2020-03-23 18:09:19 +01:00
hrtimer.c ALSA: timer: Replace tasklet with work 2020-09-09 18:32:52 +02:00
hwdep.c ALSA: compat_ioctl: avoid compat_alloc_user_space 2020-09-21 10:37:07 +02:00
hwdep_compat.c ALSA: compat_ioctl: avoid compat_alloc_user_space 2020-09-21 10:37:07 +02:00
info.c ALSA: info: Drop WARN_ON() from buffer NULL sanity check 2020-07-17 10:59:38 +02:00
info_oss.c
init.c ALSA: core: init: use DECLARE_COMPLETION_ONSTACK() macro 2020-09-03 09:26:38 +02:00
isadma.c
jack.c ALSA: jack: More constification 2020-01-05 16:14:57 +01:00
Kconfig ALSA: control: Add verification for kctl accesses 2020-01-04 09:37:59 +01:00
Makefile
memalloc.c ALSA: core: memalloc: add page alignment for iram 2020-12-30 11:54:08 +01:00
memory.c
misc.c
pcm.c ALSA: core: pcm: simplify locking for timers 2020-09-03 09:24:33 +02:00
pcm_compat.c ALSA: pcm: Fix sparse warnings wrt snd_pcm_state_t 2020-01-31 16:23:13 +01:00
pcm_dmaengine.c ALSA: fix kernel-doc markups 2020-10-26 15:26:31 +01:00
pcm_drm_eld.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pcm_iec958.c ALSA: core: pcm_iec958: fix kernel-doc 2020-07-07 10:22:33 +02:00
pcm_lib.c ALSA: fix kernel-doc markups 2020-10-26 15:26:31 +01:00
pcm_local.h ALSA: pcm: Make snd_pcm_hw_constraints_init() and _complete() static 2020-01-16 17:29:33 +01:00
pcm_memory.c ALSA: core: pcm_memory: dereference pointer after NULL checks 2020-09-03 09:24:58 +02:00
pcm_misc.c ASoC: Updates for v5.7 2020-03-30 13:43:00 +02:00
pcm_native.c ALSA: fix kernel-doc markups 2020-10-26 15:26:31 +01:00
pcm_param_trace.h
pcm_timer.c ALSA: timer: Constify snd_timer_hardware definitions 2020-01-03 09:24:07 +01:00
pcm_trace.h
rawmidi.c ALSA: rawmidi: Access runtime->avail always in spinlock 2021-01-06 14:56:52 +01:00
rawmidi_compat.c ALSA: Avoid using timespec for struct snd_rawmidi_status 2019-12-11 22:06:16 +01:00
seq_device.c ALSA: core: Constify snd_device_ops definitions 2020-01-03 09:23:51 +01:00
sgbuf.c ALSA: memalloc: Make SG-buffer helper usable for continuous buffer, too 2020-06-15 18:01:52 +02:00
sound.c
sound_oss.c
timer.c ALSA: timer: Replace tasklet with work 2020-09-09 18:32:52 +02:00
timer_compat.c ALSA: Avoid using timespec for struct snd_timer_tread 2019-12-13 11:25:57 +01:00
vmaster.c ALSA: Replace the word "slave" in vmaster API 2020-07-20 10:10:47 +02:00