WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] linux/x86: fix off-by-one error in the pirq range ch

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/x86: fix off-by-one error in the pirq range checks
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Mon, 16 Feb 2009 16:47:46 +0000
Delivery-date: Mon, 16 Feb 2009 08:48:08 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
As usual, written and tested on 2.6.27.x and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- sle11-2009-02-16.orig/arch/i386/kernel/io_apic-xen.c        2009-02-16 
17:04:32.000000000 +0100
+++ sle11-2009-02-16/arch/i386/kernel/io_apic-xen.c     2009-02-16 
17:05:52.000000000 +0100
@@ -1233,7 +1233,7 @@ static 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);
--- sle11-2009-02-16.orig/arch/x86_64/kernel/io_apic-xen.c      2009-02-16 
17:04:32.000000000 +0100
+++ sle11-2009-02-16/arch/x86_64/kernel/io_apic-xen.c   2009-02-16 
17:05:52.000000000 +0100
@@ -858,7 +858,7 @@ static 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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux/x86: fix off-by-one error in the pirq range checks, Jan Beulich <=