]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Jun 2017 10:57:11 +0000 (18:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Jun 2017 10:57:11 +0000 (18:57 +0800)
added patches:
genirq-release-resources-in-__setup_irq-error-path.patch

queue-3.18/genirq-release-resources-in-__setup_irq-error-path.patch [new file with mode: 0644]
queue-3.18/series

diff --git a/queue-3.18/genirq-release-resources-in-__setup_irq-error-path.patch b/queue-3.18/genirq-release-resources-in-__setup_irq-error-path.patch
new file mode 100644 (file)
index 0000000..9dde590
--- /dev/null
@@ -0,0 +1,38 @@
+From fa07ab72cbb0d843429e61bf179308aed6cbe0dd Mon Sep 17 00:00:00 2001
+From: Heiner Kallweit <hkallweit1@gmail.com>
+Date: Sun, 11 Jun 2017 00:38:36 +0200
+Subject: genirq: Release resources in __setup_irq() error path
+
+From: Heiner Kallweit <hkallweit1@gmail.com>
+
+commit fa07ab72cbb0d843429e61bf179308aed6cbe0dd upstream.
+
+In case __irq_set_trigger() fails the resources requested via
+irq_request_resources() are not released.
+
+Add the missing release call into the error handling path.
+
+Fixes: c1bacbae8192 ("genirq: Provide irq_request/release_resources chip callbacks")
+Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Link: http://lkml.kernel.org/r/655538f5-cb20-a892-ff15-fbd2dd1fa4ec@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/irq/manage.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/kernel/irq/manage.c
++++ b/kernel/irq/manage.c
+@@ -1156,8 +1156,10 @@ __setup_irq(unsigned int irq, struct irq
+                       ret = __irq_set_trigger(desc, irq,
+                                       new->flags & IRQF_TRIGGER_MASK);
+-                      if (ret)
++                      if (ret) {
++                              irq_release_resources(desc);
+                               goto out_mask;
++                      }
+               }
+               desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \
index 829b7b3d857671654a8f19bef016e5dfa6f86405..366e8af442df0eec803e6e9b82bbd3928dc9b4b1 100644 (file)
@@ -27,3 +27,4 @@ drivers-misc-c2port-c2port-duramar2150.c-checking-for-null-instead-of-is_err.pat
 usb-xhci-asmedia-asm1042a-chipset-need-shorts-tx-quirk.patch
 mm-memory-failure.c-use-compound_head-flags-for-huge-pages.patch
 swap-cond_resched-in-swap_cgroup_prepare.patch
+genirq-release-resources-in-__setup_irq-error-path.patch