linux/sound/core/seq
Takashi Iwai 8419b74a43 ALSA: virmidi: Fix too long output trigger loop
commit 50e9ffb199 upstream.

The virmidi output trigger tries to parse the all available bytes and
process sequencer events as much as possible.  In a normal situation,
this is supposed to be relatively short, but a program may give a huge
buffer and it'll take a long time in a single spin lock, which may
eventually lead to a soft lockup.

This patch simply adds a workaround, a cond_resched() call in the loop
if applicable.  A better solution would be to move the event processor
into a work, but let's put a duct-tape quickly at first.

Reported-and-tested-by: Dae R. Jeong <threeearcat@gmail.com>
Reported-by: syzbot+619d9f40141d826b097e@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-22 07:48:36 +02:00
..
oss ALSA: seq: oss: Hardening for potential Spectre v1 2018-05-02 07:53:41 -07:00
Kconfig
Makefile
seq_clientmgr.c ALSA: seq: Clear client entry before deleting else at closing 2018-03-22 09:23:31 +01:00
seq_clientmgr.h ALSA: seq: Make ioctls race-free 2018-02-03 17:04:25 +01:00
seq_compat.c
seq_device.c ALSA: seq: Cancel pending autoload work at unbinding device 2017-11-18 11:11:05 +01:00
seq_dummy.c
seq_fifo.c ALSA: seq: More protection for concurrent write and ioctl races 2018-03-18 11:17:50 +01:00
seq_fifo.h
seq_info.c
seq_info.h
seq_lock.c ALSA: seq: Enable 'use' locking in all configurations 2017-10-27 10:23:16 +02:00
seq_lock.h ALSA: seq: Enable 'use' locking in all configurations 2017-10-27 10:23:16 +02:00
seq_memory.c ALSA: seq: More protection for concurrent write and ioctl races 2018-03-18 11:17:50 +01:00
seq_memory.h ALSA: seq: More protection for concurrent write and ioctl races 2018-03-18 11:17:50 +01:00
seq_midi_emul.c
seq_midi_event.c
seq_midi.c
seq_ports.c
seq_ports.h
seq_prioq.c ALSA: seq: Fix possible UAF in snd_seq_check_queue() 2018-03-22 09:23:31 +01:00
seq_prioq.h ALSA: seq: Fix possible UAF in snd_seq_check_queue() 2018-03-22 09:23:31 +01:00
seq_queue.c ALSA: seq: Fix possible UAF in snd_seq_check_queue() 2018-03-22 09:23:31 +01:00
seq_queue.h
seq_system.c
seq_system.h
seq_timer.c ALSA: seq: Remove spurious WARN_ON() at timer check 2017-12-16 10:33:49 +01:00
seq_timer.h
seq_virmidi.c ALSA: virmidi: Fix too long output trigger loop 2018-08-22 07:48:36 +02:00
seq.c