提交 6f8a0ed4 编写于 作者: J Jeremy Fitzhardinge 提交者: 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: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册