kernel_optimize_test/sound/core/seq
Takashi Iwai af8d077350 ALSA: seq: Set upper limit of processed events
[ Upstream commit 6fadb494a638d8b8a55864ecc6ac58194f03f327 ]

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 10:54:22 +01:00
..
oss ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info() 2021-01-27 11:54:51 +01:00
Kconfig
Makefile
seq_clientmgr.c ALSA: seq: Fix concurrent access to queue current tick/time 2020-02-14 15:53:09 +01:00
seq_clientmgr.h
seq_compat.c
seq_dummy.c
seq_fifo.c
seq_fifo.h
seq_info.c
seq_info.h
seq_lock.c
seq_lock.h
seq_memory.c
seq_memory.h
seq_midi_emul.c ALSA: Use fallthrough pseudo-keyword 2020-07-09 13:01:29 +02:00
seq_midi_event.c
seq_midi.c
seq_ports.c ALSA: seq: Fix racy deletion of subscriber 2021-08-12 13:22:01 +02:00
seq_ports.h
seq_prioq.c
seq_prioq.h
seq_queue.c ALSA: seq: Set upper limit of processed events 2022-01-27 10:54:22 +01:00
seq_queue.h ALSA: seq: Use bool for snd_seq_queue internal flags 2021-01-06 14:56:52 +01:00
seq_system.c
seq_system.h
seq_timer.c ALSA: seq: Fix race of snd_seq_timer_open() 2021-06-16 12:01:38 +02:00
seq_timer.h ALSA: seq: Fix concurrent access to queue current tick/time 2020-02-14 15:53:09 +01:00
seq_virmidi.c ALSA: seq: virmidi: Fix running status after receiving sysex 2020-03-16 10:06:22 +01:00
seq.c