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

[Xen-changelog] [linux-2.6.18-xen] linux/x86: fix off-by-one error in the pirq range checks



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1234870273 0
# Node ID 2f1b770d84e54f76185181b0cc74337bf79a2a83
# Parent  f0db1ac7ca8d55defe710ab0539bdc8578772677
linux/x86: fix off-by-one error in the pirq range checks

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 arch/i386/kernel/io_apic-xen.c   |    2 +-
 arch/x86_64/kernel/io_apic-xen.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -r f0db1ac7ca8d -r 2f1b770d84e5 arch/i386/kernel/io_apic-xen.c
--- a/arch/i386/kernel/io_apic-xen.c    Tue Feb 17 11:25:51 2009 +0000
+++ b/arch/i386/kernel/io_apic-xen.c    Tue Feb 17 11:31:13 2009 +0000
@@ -1220,7 +1220,7 @@ int assign_irq_vector(int irq)
 
        BUG_ON(irq != AUTO_ASSIGN && (unsigned)irq >= NR_IRQ_VECTORS);
 
-       if (irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS)
+       if (irq < PIRQ_BASE || irq - PIRQ_BASE >= NR_PIRQS)
                return -EINVAL;
 
        spin_lock_irqsave(&vector_lock, flags);
diff -r f0db1ac7ca8d -r 2f1b770d84e5 arch/x86_64/kernel/io_apic-xen.c
--- a/arch/x86_64/kernel/io_apic-xen.c  Tue Feb 17 11:25:51 2009 +0000
+++ b/arch/x86_64/kernel/io_apic-xen.c  Tue Feb 17 11:31:13 2009 +0000
@@ -895,7 +895,7 @@ int assign_irq_vector(int irq)
   
        BUG_ON(irq != AUTO_ASSIGN && (unsigned)irq >= NR_IRQ_VECTORS);
 
-       if (irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS)
+       if (irq < PIRQ_BASE || irq - PIRQ_BASE >= NR_PIRQS)
                return -EINVAL;
 
        spin_lock_irqsave(&vector_lock, flags);

_______________________________________________
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®.