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:12 +0100
commitd778a796ad96ac29f5c7157a02f255ca05313e54 (patch)
tree47738cc528c604932b1eda1cdb05eef3f6cab36a
parent36052ff43212c5d6a4b127eccdba3154be55ebfc (diff)
ALSA: seq: add error check in snd_seq_system_client_init()
(bsc#1121278).
-rw-r--r--patches.drivers/ALSA-seq-add-error-check-in-snd_seq_system_client_in.patch36
-rw-r--r--series.conf1
2 files changed, 37 insertions, 0 deletions
diff --git a/patches.drivers/ALSA-seq-add-error-check-in-snd_seq_system_client_in.patch b/patches.drivers/ALSA-seq-add-error-check-in-snd_seq_system_client_in.patch
new file mode 100644
index 0000000000..55f113ac48
--- /dev/null
+++ b/patches.drivers/ALSA-seq-add-error-check-in-snd_seq_system_client_in.patch
@@ -0,0 +1,36 @@
+From c4f1957e14444e444b35418e85069b7ab65465a5 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Tue, 28 Aug 2018 11:46:34 +0300
+Subject: [PATCH] ALSA: seq: add error check in snd_seq_system_client_init()
+Git-commit: c4f1957e14444e444b35418e85069b7ab65465a5
+Patch-mainline: v4.20-rc1
+References: bsc#1121278
+
+Static checkers complain that snd_seq_create_kernel_client() can return
+-EBUSY here so we need to have some error handling.
+
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ sound/core/seq/seq_system.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c
+index 8ce1d0b40dce..3b89b0adad6a 100644
+--- a/sound/core/seq/seq_system.c
++++ b/sound/core/seq/seq_system.c
+@@ -134,6 +134,10 @@ int __init snd_seq_system_client_init(void)
+
+ /* register client */
+ sysclient = snd_seq_create_kernel_client(NULL, 0, "System");
++ if (sysclient < 0) {
++ kfree(port);
++ return sysclient;
++ }
+
+ /* register timer */
+ strcpy(port->name, "Timer");
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index b154cd1353..43b5f25d14 100644
--- a/series.conf
+++ b/series.conf
@@ -40507,6 +40507,7 @@
patches.drivers/scsi-hisi_sas-Fix-NULL-pointer-dereference.patch
patches.drivers/ALSA-pcm-Return-0-when-size-start_threshold-in-captu.patch
patches.drivers/ALSA-pcm-signedness-bug-in-snd_pcm_plug_alloc.patch
+ patches.drivers/ALSA-seq-add-error-check-in-snd_seq_system_client_in.patch
patches.drivers/ALSA-memalloc-Don-t-align-the-size-to-power-of-two.patch
patches.drivers/ALSA-memalloc-Simplify-snd_malloc_dev_pages-calls.patch
patches.drivers/ALSA-memalloc-Add-non-cached-buffer-type.patch