aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2011-04-02 16:08:21 +0100
committerKeir Fraser <keir@xen.org>2011-04-02 16:08:21 +0100
commitaae7f8f703f57f042431b4a74ee6ca6c9a36fd98 (patch)
tree66f3a6db79dabf7c2bc5a0222e45e1e84b0e3261
parentf33c74b5eaaded534a3b2270791e12549b9547b0 (diff)
downloadxen-aae7f8f703f57f042431b4a74ee6ca6c9a36fd98.tar.gz
xen-aae7f8f703f57f042431b4a74ee6ca6c9a36fd98.tar.bz2
xen-aae7f8f703f57f042431b4a74ee6ca6c9a36fd98.zip
x86: __pirq_guest_eoi() must check it is called for a fully
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
-rw-r--r--xen/arch/x86/irq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index e0c7c95957..3a4d3bfef4 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1012,6 +1012,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;