ia64/linux-2.6.18-xen.hg

changeset 797:2f1b770d84e5

linux/x86: fix off-by-one error in the pirq range checks

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Feb 17 11:31:13 2009 +0000 (2009-02-17)
parents f0db1ac7ca8d
children b02a90bf5bbc
files arch/i386/kernel/io_apic-xen.c arch/x86_64/kernel/io_apic-xen.c
line diff
     1.1 --- a/arch/i386/kernel/io_apic-xen.c	Tue Feb 17 11:25:51 2009 +0000
     1.2 +++ b/arch/i386/kernel/io_apic-xen.c	Tue Feb 17 11:31:13 2009 +0000
     1.3 @@ -1220,7 +1220,7 @@ int assign_irq_vector(int irq)
     1.4  
     1.5  	BUG_ON(irq != AUTO_ASSIGN && (unsigned)irq >= NR_IRQ_VECTORS);
     1.6  
     1.7 -	if (irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS)
     1.8 +	if (irq < PIRQ_BASE || irq - PIRQ_BASE >= NR_PIRQS)
     1.9  		return -EINVAL;
    1.10  
    1.11  	spin_lock_irqsave(&vector_lock, flags);
     2.1 --- a/arch/x86_64/kernel/io_apic-xen.c	Tue Feb 17 11:25:51 2009 +0000
     2.2 +++ b/arch/x86_64/kernel/io_apic-xen.c	Tue Feb 17 11:31:13 2009 +0000
     2.3 @@ -895,7 +895,7 @@ int assign_irq_vector(int irq)
     2.4    
     2.5    	BUG_ON(irq != AUTO_ASSIGN && (unsigned)irq >= NR_IRQ_VECTORS);
     2.6  
     2.7 -	if (irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS)
     2.8 +	if (irq < PIRQ_BASE || irq - PIRQ_BASE >= NR_PIRQS)
     2.9  		return -EINVAL;
    2.10  
    2.11  	spin_lock_irqsave(&vector_lock, flags);