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

[Xen-devel] [PATCH] xen: Check for valid pirq values in hvm_domain_use_pirq



Check for valid pirq values in hvm_domain_use_pirq.

This patch should also be backported to 4.1.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff -r 7955bb98ee9d xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Thu May 12 14:13:29 2011 +0000
+++ b/xen/arch/x86/irq.c        Thu May 12 14:25:40 2011 +0000
@@ -1955,7 +1955,7 @@ int hvm_domain_use_pirq(struct domain *d
 {
     int emuirq;
     
-    if ( !is_hvm_domain(d) )
+    if ( !is_hvm_domain(d) || pirq < 0 )
         return 0;
 
     emuirq = domain_pirq_to_emuirq(d, pirq);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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