Commit 6f8a0ed4 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Ingo Molnar

sparseirq, xen: make sure irq_desc is allocated for interrupts

Impact: fix crash

Make sure all Xen irqs have an irq_desc.
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 17483a1f
......@@ -233,6 +233,7 @@ static void unmask_evtchn(int port)
static int find_unbound_irq(void)
{
int irq;
struct irq_desc *desc;
/* Only allocate from dynirq range */
for (irq = 0; irq < nr_irqs; irq++)
......@@ -242,6 +243,10 @@ static int find_unbound_irq(void)
if (irq == nr_irqs)
panic("No available IRQ to bind to: increase nr_irqs!\n");
desc = irq_to_desc_alloc_cpu(irq, 0);
if (WARN_ON(desc == NULL))
return -1;
return irq;
}
......
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