Commit b9fb1fc7 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fix from Thomas Gleixner:
 "A single bugfix for the irq core to prevent silent data corruption and
  malfunction of threaded interrupts under certain conditions"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq: Make force irq threading setup more robust
parents 212dab05 d1f0301b
...@@ -1068,6 +1068,13 @@ static int irq_setup_forced_threading(struct irqaction *new) ...@@ -1068,6 +1068,13 @@ static int irq_setup_forced_threading(struct irqaction *new)
if (new->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT)) if (new->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT))
return 0; return 0;
/*
* No further action required for interrupts which are requested as
* threaded interrupts already
*/
if (new->handler == irq_default_primary_handler)
return 0;
new->flags |= IRQF_ONESHOT; new->flags |= IRQF_ONESHOT;
/* /*
...@@ -1075,7 +1082,7 @@ static int irq_setup_forced_threading(struct irqaction *new) ...@@ -1075,7 +1082,7 @@ static int irq_setup_forced_threading(struct irqaction *new)
* thread handler. We force thread them as well by creating a * thread handler. We force thread them as well by creating a
* secondary action. * secondary action.
*/ */
if (new->handler != irq_default_primary_handler && new->thread_fn) { if (new->handler && new->thread_fn) {
/* Allocate the secondary action */ /* Allocate the secondary action */
new->secondary = kzalloc(sizeof(struct irqaction), GFP_KERNEL); new->secondary = kzalloc(sizeof(struct irqaction), GFP_KERNEL);
if (!new->secondary) if (!new->secondary)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment