diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-12-17 13:42:29 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-18 12:48:29 +0100 |
commit | 6f8a0ed4e5d86c01db5e7e3f95d9003b7cf9cb87 (patch) | |
tree | 298852a7032f6c99773690a2e6e3f6f0f090ed6c /drivers/xen/events.c | |
parent | 17483a1f34c970e6c2cb8c082d4441bfabbe88a9 (diff) | |
download | linux-stable-6f8a0ed4e5d86c01db5e7e3f95d9003b7cf9cb87.tar.gz linux-stable-6f8a0ed4e5d86c01db5e7e3f95d9003b7cf9cb87.tar.bz2 linux-stable-6f8a0ed4e5d86c01db5e7e3f95d9003b7cf9cb87.zip |
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: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/xen/events.c')
-rw-r--r-- | drivers/xen/events.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 2924faa7f6c4..46625cd38743 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -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; } |