]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.xen/797-pirq-range-check.patch
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.xen / 797-pirq-range-check.patch
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>
4 # Date 1234870273 0
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
9
10 Signed-off-by: Jan Beulich <jbeulich@novell.com>
11
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
14
15 Signed-off-by: Jan Beulich <jbeulich@novell.com>
16
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)
20
21 BUG_ON(irq != AUTO_ASSIGN && (unsigned)irq >= NR_IRQ_VECTORS);
22
23 - if (irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS)
24 + if (irq < PIRQ_BASE || irq - PIRQ_BASE >= NR_PIRQS)
25 return -EINVAL;
26
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)
31
32 BUG_ON(irq != AUTO_ASSIGN && (unsigned)irq >= NR_IRQ_VECTORS);
33
34 - if (irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS)
35 + if (irq < PIRQ_BASE || irq - PIRQ_BASE >= NR_PIRQS)
36 return -EINVAL;
37
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)
42
43 void evtchn_register_pirq(int irq)
44 {
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)
48 return;
49 irq_info[irq] = mk_irq_info(IRQT_PIRQ, irq, 0);