]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
x86: __pirq_guest_eoi() must check it is called for a fully
authorKeir Fraser <keir@xen.org>
Sat, 2 Apr 2011 15:06:12 +0000 (16:06 +0100)
committerKeir Fraser <keir@xen.org>
Sat, 2 Apr 2011 15:06:12 +0000 (16:06 +0100)
guest-bound irq before accessing desc->action.

Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   23103:48dac730a93b
xen-unstable date:        Sat Mar 26 09:42:01 2011 +0000

xen/arch/x86/irq.c

index 3275b2d07c39175fa044dd241fba7eddab8baf2d..1fdc29513834ff54a2067993140cf6171549b106 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;