Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-01-10 20:41:49 +0100
committerTakashi Iwai <tiwai@suse.de>2019-01-11 08:35:11 +0100
commita40a3952b1a8ff48fb4d240bd1d4053941da002e (patch)
tree6c54cfd65a4fd56bf8b59e6c106ea9b72c0c06c2
parent870d8240e5dd50b196399d798f63b5612e94a59f (diff)
ALSA: seq: virmidi: Fix discarding the unsubscribed output
(bsc#1121278).
-rw-r--r--patches.drivers/ALSA-seq-virmidi-Fix-discarding-the-unsubscribed-out.patch45
-rw-r--r--series.conf1
2 files changed, 46 insertions, 0 deletions
diff --git a/patches.drivers/ALSA-seq-virmidi-Fix-discarding-the-unsubscribed-out.patch b/patches.drivers/ALSA-seq-virmidi-Fix-discarding-the-unsubscribed-out.patch
new file mode 100644
index 0000000000..e1ecee21a8
--- /dev/null
+++ b/patches.drivers/ALSA-seq-virmidi-Fix-discarding-the-unsubscribed-out.patch
@@ -0,0 +1,45 @@
+From 82fd4b05d704623a0e4aa7fda48e272a9889337d Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 14 Aug 2018 21:27:51 +0200
+Subject: [PATCH] ALSA: seq: virmidi: Fix discarding the unsubscribed output
+Git-commit: 82fd4b05d704623a0e4aa7fda48e272a9889337d
+Patch-mainline: v4.19-rc1
+References: bsc#1121278
+
+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: f7debfe54090 ("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 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
+index a2f1c6b58693..cb988efd1ed0 100644
+--- a/sound/core/seq/seq_virmidi.c
++++ b/sound/core/seq/seq_virmidi.c
+@@ -149,8 +149,9 @@ static void snd_vmidi_output_work(struct work_struct *work)
+ /* discard the outputs in dispatch mode unless subscribed */
+ if (vmidi->seq_mode == SNDRV_VIRMIDI_SEQ_DISPATCH &&
+ !(vmidi->rdev->flags & SNDRV_VIRMIDI_SUBSCRIBE)) {
+- while (!snd_rawmidi_transmit_empty(substream))
+- snd_rawmidi_transmit_ack(substream, 1);
++ char buf[32];
++ while (snd_rawmidi_transmit(substream, buf, sizeof(buf)) > 0)
++ ; /* ignored */
+ return;
+ }
+
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index 11456f32ac..20d4fc9cd7 100644
--- a/series.conf
+++ b/series.conf
@@ -38410,6 +38410,7 @@
patches.drivers/soc-mediatek-pwrap-fix-cipher-init-setting-error.patch
patches.drivers/IB-hfi1-Invalid-NUMA-node-information-can-cause-a-di.patch
patches.drivers/IB-ucm-fix-UCM-link-error.patch
+ patches.drivers/ALSA-seq-virmidi-Fix-discarding-the-unsubscribed-out.patch
patches.drivers/ALSA-hda-realtek-Fix-HP-Headset-Mic-can-t-record.patch
patches.drivers/fbdev-Distinguish-between-interlaced-and-progressive.patch
patches.drivers/video-fbdev-pxafb-clear-allocated-memory-for-video-m