1 From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/2f1b770d84e5
2 # HG changeset 797,804 patch
3 # User Keir Fraser <keir.fraser@citrix.com>
5 # Node ID 2f1b770d84e54f76185181b0cc74337bf79a2a83
6 # Parent f0db1ac7ca8d55defe710ab0539bdc8578772677
7 Subject: linux/x86: fix off-by-one error in the pirq range checks
8 Patch-mainline: obsolete
10 Signed-off-by: Jan Beulich <jbeulich@novell.com>
12 From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/f3de83c4677f
13 Subject: linux/evtchn: fix off-by-one error in the pirq range check
15 Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 --- sle11-2009-03-16.orig/arch/x86/kernel/io_apic_32-xen.c 2009-03-16 16:13:42.000000000 +0100
18 +++ sle11-2009-03-16/arch/x86/kernel/io_apic_32-xen.c 2009-03-16 16:13:45.000000000 +0100
19 @@ -1220,7 +1220,7 @@ int assign_irq_vector(int irq)
21 BUG_ON(irq != AUTO_ASSIGN && (unsigned)irq >= NR_IRQ_VECTORS);
23 - if (irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS)
24 + if (irq < PIRQ_BASE || irq - PIRQ_BASE >= NR_PIRQS)
27 spin_lock_irqsave(&vector_lock, flags);
28 --- sle11-2009-03-16.orig/arch/x86/kernel/io_apic_64-xen.c 2009-03-16 16:13:42.000000000 +0100
29 +++ sle11-2009-03-16/arch/x86/kernel/io_apic_64-xen.c 2009-03-16 16:13:45.000000000 +0100
30 @@ -895,7 +895,7 @@ int assign_irq_vector(int irq)
32 BUG_ON(irq != AUTO_ASSIGN && (unsigned)irq >= NR_IRQ_VECTORS);
34 - if (irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS)
35 + if (irq < PIRQ_BASE || irq - PIRQ_BASE >= NR_PIRQS)
38 spin_lock_irqsave(&vector_lock, flags);
39 --- sle11-2009-03-16.orig/drivers/xen/core/evtchn.c 2009-03-16 16:06:43.000000000 +0100
40 +++ sle11-2009-03-16/drivers/xen/core/evtchn.c 2009-03-16 16:14:12.000000000 +0100
41 @@ -1077,7 +1077,7 @@ void irq_resume(void)
43 void evtchn_register_pirq(int irq)
45 - BUG_ON(irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS);
46 + BUG_ON(irq < PIRQ_BASE || irq - PIRQ_BASE >= NR_PIRQS);
47 if (identity_mapped_irq(irq) || type_from_irq(irq) != IRQT_UNBOUND)
49 irq_info[irq] = mk_irq_info(IRQT_PIRQ, irq, 0);