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

[Xen-changelog] [xen-unstable] [XEN] physdev: Check for negative irqs in alloc_irq_vector.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 926d7b1316892d860513ab2438bdd43f5e38e2a4
# Parent  dc883b5e906e98744ec88d06c41e44546dd0e259
[XEN] physdev: Check for negative irqs in alloc_irq_vector.
Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
---
 xen/arch/x86/physdev.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r dc883b5e906e -r 926d7b131689 xen/arch/x86/physdev.c
--- a/xen/arch/x86/physdev.c    Wed Aug 30 17:56:49 2006 +0100
+++ b/xen/arch/x86/physdev.c    Wed Aug 30 18:02:32 2006 +0100
@@ -96,10 +96,11 @@ long do_physdev_op(int cmd, XEN_GUEST_HA
         if ( !IS_PRIV(current->domain) )
             break;
 
+        irq = irq_op.irq;
         ret = -EINVAL;
-        if ( (irq = irq_op.irq) >= NR_IRQS )
+        if ( (irq < 0) || (irq >= NR_IRQS) )
             break;
-        
+
         irq_op.vector = assign_irq_vector(irq);
         ret = copy_to_guest(arg, &irq_op, 1) ? -EFAULT : 0;
         break;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.