Skip to contentSkip to conversation

linux/evtchn: fix off-by-one error in the pirq range check here too

PATCH New Jan Beulich 1 participant 1 message Mar 4, 2009 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux/evtchn: fix off-by-one error in the pirq range check here too

As usual, written and tested on 2.6.27.19 and made apply to the 2.6.18 tree without further testing.

drivers/xen/core/evtchn.c +1 -1
@@ -1160,7 +1160,7 @@ core_initcall(evtchn_register);
 
 void evtchn_register_pirq(int irq)
 {
-	BUG_ON(irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS);
+	BUG_ON(irq < PIRQ_BASE || irq - PIRQ_BASE >= NR_PIRQS);
 	if (identity_mapped_irq(irq) || type_from_irq(irq) != IRQT_UNBOUND)
 		return;
 	irq_info[irq] = mk_irq_info(IRQT_PIRQ, irq, 0);