linux-stable/sound/core/seq
Takashi Iwai 2ab1c43eab ALSA: seq: Set upper limit of processed events
[ Upstream commit 6fadb494a6 ]

Currently ALSA sequencer core tries to process the queued events as
much as possible when they become dispatchable.  If applications try
to queue too massive events to be processed at the very same timing,
the sequencer core would still try to process such all events, either
in the interrupt context or via some notifier; in either away, it
might be a cause of RCU stall or such problems.

As a potential workaround for those problems, this patch adds the
upper limit of the amount of events to be processed.  The remaining
events are processed in the next batch, so they won't be lost.

For the time being, it's limited up to 1000 events per queue, which
should be high enough for any normal usages.

Reported-by: Zqiang <qiang.zhang1211@gmail.com>
Reported-by: syzbot+bb950e68b400ab4f65f8@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20211102033222.3849-1-qiang.zhang1211@gmail.com
Link: https://lore.kernel.org/r/20211207165146.2888-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 09:04:29 +01:00
..
oss ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info() 2021-01-27 11:05:34 +01:00
Kconfig ALSA: seq: Fix CONFIG_SND_SEQ_MIDI dependency 2017-08-11 09:51:41 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
seq.c ALSA: seq: Fix leftovers at probe error path 2018-08-01 22:54:36 +02:00
seq_clientmgr.c ALSA: seq: Fix concurrent access to queue current tick/time 2020-02-28 16:39:00 +01:00
seq_clientmgr.h ALSA: seq: Make ioctls race-free 2018-01-11 14:37:51 +01:00
seq_compat.c ALSA: seq: fix passing wrong pointer in function call of compatibility layer 2016-10-12 20:09:36 +02:00
seq_dummy.c
seq_fifo.c ALSA: seq: Fix potential concurrent access to the deleted pool 2019-09-06 10:22:09 +02:00
seq_fifo.h ALSA: seq: Fix potential concurrent access to the deleted pool 2019-09-06 10:22:09 +02:00
seq_info.c ALSA: seq: Fix leftovers at probe error path 2018-08-01 22:54:36 +02:00
seq_info.h ALSA: seq: Fix leftovers at probe error path 2018-08-01 22:54:36 +02:00
seq_lock.c ALSA: seq: Enable 'use' locking in all configurations 2017-10-18 08:01:46 +02:00
seq_lock.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
seq_memory.c ALSA: seq: Remove dead codes 2018-08-01 22:54:35 +02:00
seq_memory.h ALSA: seq: Remove dead codes 2018-08-01 22:54:35 +02:00
seq_midi.c ALSA: seq: Minor cleanup of MIDI event parser helpers 2018-08-01 22:54:35 +02:00
seq_midi_emul.c ALSA: seq: Mark expected switch fall-through 2018-08-04 08:30:36 +02:00
seq_midi_event.c ALSA: seq: Remove dead codes 2018-08-01 22:54:35 +02:00
seq_ports.c ALSA: seq: Fix racy deletion of subscriber 2021-08-12 13:19:38 +02:00
seq_ports.h ALSA: seq: Fix race of get-subscription call vs port-delete ioctls 2019-06-19 08:18:01 +02:00
seq_prioq.c ALSA: seq: Fix possible UAF in snd_seq_check_queue() 2018-03-10 17:29:49 +01:00
seq_prioq.h ALSA: seq: Fix possible UAF in snd_seq_check_queue() 2018-03-10 17:29:49 +01:00
seq_queue.c ALSA: seq: Set upper limit of processed events 2022-01-27 09:04:29 +01:00
seq_queue.h ALSA: seq: Use bool for snd_seq_queue internal flags 2021-01-06 14:45:00 +01:00
seq_system.c ALSA: seq: Do error checks at creating system ports 2019-11-20 18:45:27 +01:00
seq_system.h
seq_timer.c ALSA: seq: Fix concurrent access to queue current tick/time 2020-02-28 16:39:00 +01:00
seq_timer.h ALSA: seq: Fix concurrent access to queue current tick/time 2020-02-28 16:39:00 +01:00
seq_virmidi.c ALSA: seq: virmidi: Fix running status after receiving sysex 2020-03-25 08:06:09 +01:00