linux/sound
Takashi Iwai dc06b2632c 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
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2018-12-16 22:08:27 +00:00
..
aoa ALSA: snd-aoa: add of_node_put() in error path 2018-12-16 22:08:07 +00:00
arm ASoC: fix broken pxa SoC support 2015-10-19 10:54:37 +01:00
atmel ALSA: sound/atmel/ac97c.c: Convert to module_platform_driver 2014-04-16 10:22:03 +02:00
core ALSA: virmidi: Fix too long output trigger loop 2018-12-16 22:08:27 +00:00
drivers ALSA: vx: Fix possible transfer overflow 2018-12-16 22:08:24 +00:00
firewire ALSA: fireworks: accessing to user space outside spinlock 2016-11-20 01:17:20 +00:00
i2c ALSA: ak411x: Fix stall in work callback 2015-02-10 13:38:44 +00:00
isa ALSA: msnd: add some missing curly braces 2018-11-20 18:05:56 +00:00
mips ALSA: au1x00: Use resource_size instead of computation 2014-05-28 17:50:57 +02:00
oss sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND) 2015-05-28 10:53:17 +01:00
parisc ALSA: parisc: Convert to snd_card_new() with a device pointer 2014-02-14 08:14:05 +01:00
pci ALSA: cs5535audio: Fix invalid endian conversion 2018-12-16 22:08:25 +00:00
pcmcia ALSA: vxpocket: Fix invalid endian conversions 2018-12-16 22:08:24 +00:00
ppc ALSA: ppc: Convert to snd_card_new() with a device pointer 2014-02-14 08:14:06 +01:00
sh ALSA: sh: Convert to snd_card_new() with a device pointer 2014-02-14 08:14:07 +01:00
soc ASoC: dapm: delete dapm_kcontrol_data paths list before freeing it 2018-11-20 18:05:08 +00:00
sparc ALSA: sparc: Convert to snd_card_new() with a device pointer 2014-02-14 08:14:07 +01:00
spi ALSA: spi: Convert to snd_card_new() with a device pointer 2014-02-14 08:14:08 +01:00
synth ALSA: synth: Fix conflicting OSS device registration on AWE32 2015-10-30 13:59:29 +00:00
usb ALSA: usb: mixer: volume quirk for CM102-A+/102S+ 2018-10-21 08:46:04 +01:00
ac97_bus.c sound: Fixed line limit issue in sound/ac97_bus.c 2010-12-06 16:09:49 +01:00
Kconfig sound: remove reference to feature-removal-schedule.txt 2012-12-17 17:15:12 -08:00
last.c ALSA: Remove the last mention of SNDRV_MAIN_OBJECT_FILE 2012-09-03 10:07:23 +02:00
Makefile ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver 2011-03-15 08:42:22 +01:00
sound_core.c consolidate the reassignments of ->f_op in ->open() instances 2013-10-24 23:34:53 -04:00
sound_firmware.c sound_firmware: don't bother with filp_close() 2013-04-09 15:16:32 -04:00