]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: seq: virmidi: Fix discarding the unsubscribed output
authorTakashi Iwai <tiwai@suse.de>
Tue, 14 Aug 2018 19:27:51 +0000 (21:27 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 14 Aug 2018 20:50:52 +0000 (22:50 +0200)
commit3ba5f66cf3c6017195d5ce3de18d9efc8be70388
tree711f3d02a97fcfb7231193c85b49a976aa07b5a1
parentce19b1a1130ee194838792e2d9854a09498d80e4
ALSA: seq: virmidi: Fix discarding the unsubscribed output

The recent change to move the virmidi output processing to a work
slightly modified the code to discard the unsubscribed outputs so that
it works without a temporary buffer.  However, this is actually buggy,
and may spew a kernel warning due to the unexpected call of
snd_rawmidi_transmit_ack(), as triggered by syzbot.

This patch takes back to the original code in that part, use a
temporary buffer and simply repeat snd_rawmidi_transmit(), in order to
address the regression.

Fixes: 429cbd99969e ("ALSA: seq: virmidi: Offload the output event processing")
Reported-by: syzbot+ec5f605c91812d200367@syzkaller.appspotmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/seq_virmidi.c