]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
xen: events: do not free legacy IRQs
authorIan Campbell <Ian.Campbell@eu.citrix.com>
Thu, 3 Feb 2011 09:49:35 +0000 (09:49 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 3 Mar 2011 17:00:27 +0000 (12:00 -0500)
c514d00c8057 "xen: events: add xen_allocate_irq_{dynamic, gsi} and
xen_free_irq" correctly avoids reallocating legacy IRQs (which are
managed by the arch core) but erroneously did not prevent them being
freed.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/events.c

index 06f2e61de69106c3ea498321a80fdf89f454e5b4..accb37ad0944e1c29a62e93dd486ab23c67465b1 100644 (file)
@@ -434,6 +434,10 @@ static int xen_allocate_irq_gsi(unsigned gsi)
 
 static void xen_free_irq(unsigned irq)
 {
+       /* Legacy IRQ descriptors are managed by the arch. */
+       if (irq < NR_IRQS_LEGACY)
+               return;
+
        irq_free_desc(irq);
 }