public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: make sure irq_desc is allocated for interrupts
@ 2008-12-17 21:42 Jeremy Fitzhardinge
  2008-12-18 11:48 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Fitzhardinge @ 2008-12-17 21:42 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: the arch/x86 maintainers, Linux Kernel Mailing List

Impact: bugfix

Make sure all Xen irqs have an irq_desc.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
 drivers/xen/events.c |    5 +++++
 1 file changed, 5 insertions(+)

===================================================================
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -233,6 +233,7 @@
 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 @@
 	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;
 }
 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-18 11:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-17 21:42 [PATCH] xen: make sure irq_desc is allocated for interrupts Jeremy Fitzhardinge
2008-12-18 11:48 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox