From: Keir Fraser Date: Sat, 2 Apr 2011 15:06:12 +0000 (+0100) Subject: x86: __pirq_guest_eoi() must check it is called for a fully X-Git-Tag: 4.1.1-rc1~44 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=87b419328bbf58565ded71ed59278f2cc4db296f;p=people%2Fvhanquez%2Fxen.git x86: __pirq_guest_eoi() must check it is called for a fully guest-bound irq before accessing desc->action. Signed-off-by: Keir Fraser xen-unstable changeset: 23103:48dac730a93b xen-unstable date: Sat Mar 26 09:42:01 2011 +0000 --- diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 3275b2d07..1fdc29513 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -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;