Commit a614a610 authored by Thomas Gleixner's avatar Thomas Gleixner

genirq: Remove bogus restriction in irq_move_mask_irq()

If an interrupt is marked with the no balancing flag, we still allow
setting the affinity for such an interrupt from the kernel itself, but
for interrupts which move the affinity from interrupt context via
irq_move_mask_irq() this runs into a check for the no balancing flag,
which in turn ends up with an endless storm of stack dumps because the
move pending flag is not reset.

Allow the move for interrupts which have the no balancing flag set and
clear the move pending bit before checking for interrupts with the per
cpu flag set.
Reported-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1506201002570.4107@nanosSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent c64301a2
...@@ -12,16 +12,16 @@ void irq_move_masked_irq(struct irq_data *idata) ...@@ -12,16 +12,16 @@ void irq_move_masked_irq(struct irq_data *idata)
if (likely(!irqd_is_setaffinity_pending(&desc->irq_data))) if (likely(!irqd_is_setaffinity_pending(&desc->irq_data)))
return; return;
irqd_clr_move_pending(&desc->irq_data);
/* /*
* Paranoia: cpu-local interrupts shouldn't be calling in here anyway. * Paranoia: cpu-local interrupts shouldn't be calling in here anyway.
*/ */
if (!irqd_can_balance(&desc->irq_data)) { if (irqd_is_per_cpu(&desc->irq_data)) {
WARN_ON(1); WARN_ON(1);
return; return;
} }
irqd_clr_move_pending(&desc->irq_data);
if (unlikely(cpumask_empty(desc->pending_mask))) if (unlikely(cpumask_empty(desc->pending_mask)))
return; return;
......
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