]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
x86: __pirq_guest_eoi() must check it is called for a fully
authorKeir Fraser <keir@xen.org>
Sat, 26 Mar 2011 09:42:01 +0000 (09:42 +0000)
committerKeir Fraser <keir@xen.org>
Sat, 26 Mar 2011 09:42:01 +0000 (09:42 +0000)
guest-bound irq before accessing desc->action.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/arch/x86/irq.c

index 3595ef527193ee7439c141947fdb6e81d59bf57a..ab2e6c9993ea529fc082b048b85574baaaa0832b 100644 (file)
@@ -1022,6 +1022,12 @@ static void __pirq_guest_eoi(struct domain *d, int pirq)
     if ( desc == NULL )
         return;
 
+    if ( !(desc->status & IRQ_GUEST) )
+    {
+        spin_unlock_irq(&desc->lock);
+        return;
+    }
+
     action = (irq_guest_action_t *)desc->action;
     irq = desc - irq_desc;