lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 13 Mar 2017 17:52:40 -0700
From:   Tony Lindgren <tony@...mide.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] genirq: Fix handle_nested_irq() for IRQF_SHARED

Shared interrupts can be registered with handle_nested_irq(), but
currently only one of the registered handlers gets called.

The use of shared interrupts with handle_nested_irq() is probably rare,
but at least a case of a shared VBUS interrupt between USB PHY and
battery charger drivers for a PMIC makes sense.

Typically for_each_action_of_desc() gets called via handle_irq_event()
at _handle_irq_event_percpu(), but handle_nested_irq() is different
because of it's dummy irq_nested_primary_handler().

Let's fix the issue by calling the handler for all the entries in
the action list.

Fixes: 399b5da29b9f ("genirq: Support nested threaded irq handling")
Signed-off-by: Tony Lindgren <tony@...mide.com>
---
 kernel/irq/chip.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -348,9 +348,11 @@ void handle_nested_irq(unsigned int irq)
 	irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS);
 	raw_spin_unlock_irq(&desc->lock);
 
-	action_ret = action->thread_fn(action->irq, action->dev_id);
-	if (!noirqdebug)
-		note_interrupt(desc, action_ret);
+	for_each_action_of_desc(desc, action) {
+		action_ret = action->thread_fn(action->irq, action->dev_id);
+		if (!noirqdebug)
+			note_interrupt(desc, action_ret);
+	}
 
 	raw_spin_lock_irq(&desc->lock);
 	irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS);
-- 
2.11.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ