Home Home > GIT Browse > vanilla
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-08-03 14:40:31 +0200
committerTakashi Iwai <tiwai@suse.de>2018-08-03 14:40:31 +0200
commitcb38cecb001b854fc5d3fc280e6d205b0a02cfd7 (patch)
treecbad386f2724a38327e04603a7670f7afaef8d3f
parent7cea46b99136faafa52b841759e59adbf4c6ea25 (diff)
parent9178bf4347599007cfe4d8b5d910df397de0744d (diff)
Merge branch 'users/hare/SLE15/for-next' into SLE15
Pull genirq fix from Hannes Reinecke
-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 5c6212885b..ca044dfbc1 100644
--- a/series.conf
+++ b/series.conf
@@ -6976,6 +6976,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