Home Home > GIT Browse > stable-xen
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2018-08-03 14:49:54 +0200
committerJohannes Thumshirn <jthumshirn@suse.de>2018-08-03 14:49:54 +0200
commit157cc4de9c4d6fa7e37e5e8afb2e68038f92731c (patch)
tree49d4a08f46940ef2864b2c73bc68ef15337b8aa7
parent4009d13bfdc7c29afc8875c86559744c95427c1f (diff)
parentcb38cecb001b854fc5d3fc280e6d205b0a02cfd7 (diff)
Merge remote-tracking branch 'origin/SLE15' into SLE12-SP4rpm-4.12.14-94.32
-rw-r--r--patches.fixes/genirq-Check-__free_irq-return-value-for-NULL.patch40
-rw-r--r--series.conf1
2 files changed, 41 insertions, 0 deletions
diff --git a/patches.fixes/genirq-Check-__free_irq-return-value-for-NULL.patch b/patches.fixes/genirq-Check-__free_irq-return-value-for-NULL.patch
new file mode 100644
index 0000000000..0fa117dc95
--- /dev/null
+++ b/patches.fixes/genirq-Check-__free_irq-return-value-for-NULL.patch
@@ -0,0 +1,40 @@
+From: Alexandru Moise <00moses.alexander00@gmail.com>
+Date: Tue, 19 Sep 2017 22:04:12 +0200
+Subject: [PATCH] genirq: Check __free_irq() return value for NULL
+References: bsc#1103517
+Git-commit: 2827a418ca1b23e432e62c9b3d0e7cf3255dfe88
+Patch-mainline: v4.14-rc3
+
+__free_irq() can return a NULL irqaction for example when trying to free
+already-free IRQ, but the callsite unconditionally dereferences the
+returned pointer.
+
+Fix this by adding a check and return NULL.
+
+Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Link: https://lkml.kernel.org/r/20170919200412.GA29985@gmail.com
+
+Signed-off-by: Hannes Reinecke <hare@suse.de>
+---
+ kernel/irq/manage.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
+index 6567d04262d4..c16c9fd151ff 100644
+--- a/kernel/irq/manage.c
++++ b/kernel/irq/manage.c
+@@ -1623,6 +1623,10 @@ const void *free_irq(unsigned int irq, void *dev_id)
+ #endif
+
+ action = __free_irq(irq, dev_id);
++
++ if (!action)
++ return NULL;
++
+ devname = action->name;
+ kfree(action);
+ return devname;
+--
+2.12.3
+
diff --git a/series.conf b/series.conf
index 15b3187a5f..fcae8ce15c 100644
--- a/series.conf
+++ b/series.conf
@@ -7004,6 +7004,7 @@
patches.fixes/scsi-ILLEGAL-REQUEST-ASC-27-target-failure.patch
patches.suse/objtool-Skip-unreachable-warnings-for-GCC-4.4-and-ol.patch
patches.suse/objtool-Support-unoptimized-frame-pointer-setup.patch
+ patches.fixes/genirq-Check-__free_irq-return-value-for-NULL.patch
patches.fixes/irq-generic-chip-Don-t-replace-domain-s-name.patch
patches.fixes/0001-futex-Fix-pi_state-owner-serialization.patch
patches.suse/0001-locking-rwsem-xadd-Fix-missed-wakeup-due-to-reorderi.patch