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

[Xen-changelog] [xen-4.1-testing] x86/passthrough: don't leak guest IRQs



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1331108388 0
# Node ID d21100f1d00e57649b24c8781be2133a74503f4b
# Parent  0bea45ab39f716d9d3d370f33ebb92a92f27e7ad
x86/passthrough: don't leak guest IRQs

As unmap_domain_pirq_emuirq() fails on a never mapped pIRQ, it must
not
be called for the non-emu-IRQ case (to prevent the entire unmap
operation failing).

Based on a suggestion from Stefano.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Tested-by: Yongjie Ren <yongjie.ren@xxxxxxxxx>
Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
xen-unstable changeset:   24448:3a22ed3ec534
xen-unstable date:        Mon Jan 02 09:26:19 2012 +0100
---


diff -r 0bea45ab39f7 -r d21100f1d00e xen/arch/x86/physdev.c
--- a/xen/arch/x86/physdev.c    Wed Mar 07 08:17:44 2012 +0000
+++ b/xen/arch/x86/physdev.c    Wed Mar 07 08:19:48 2012 +0000
@@ -233,7 +233,8 @@
     if ( is_hvm_domain(d) )
     {
         spin_lock(&d->event_lock);
-        ret = unmap_domain_pirq_emuirq(d, unmap->pirq);
+        if ( domain_pirq_to_emuirq(d, unmap->pirq) != IRQ_UNBOUND )
+            ret = unmap_domain_pirq_emuirq(d, unmap->pirq);
         spin_unlock(&d->event_lock);
         if ( unmap->domid == DOMID_SELF || ret )
             goto free_domain;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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