[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] xen: get_free_pirq: make sure that the returned pirq is allocated



Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff -r 54845807a8ad xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Tue Aug 30 11:56:37 2011 +0000
+++ b/xen/arch/x86/irq.c        Tue Aug 30 11:58:00 2011 +0000
@@ -1584,13 +1584,19 @@ int get_free_pirq(struct domain *d, int 
     {
         for ( i = 16; i < nr_irqs_gsi; i++ )
             if ( is_free_pirq(d, pirq_info(d, i)) )
+            {
+                pirq_get_info(d, i);
                 return i;
+            }
     }
     else
     {
         for ( i = d->nr_pirqs - 1; i >= nr_irqs_gsi; i-- )
             if ( is_free_pirq(d, pirq_info(d, i)) )
+            {
+                pirq_get_info(d, i);
                 return i;
+            }
     }
 
     return -ENOSPC;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.