From: "Jan Beulich" Subject: [PATCH] linux/evtchn: fix off-by-one error in the pirq range check here too Date: Wed, 04 Mar 2009 11:33:15 +0000 Message-ID: <49AE750B.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org As usual, written and tested on 2.6.27.19 and made apply to the 2.6.18 tree without further testing. Signed-off-by: Jan Beulich --- sle11-2009-03-04.orig/drivers/xen/core/evtchn.c 2009-03-04 = 11:38:32.000000000 +0100 +++ sle11-2009-03-04/drivers/xen/core/evtchn.c 2009-03-04 11:38:50.0000000= 00 +0100 @@ -1160,7 +1160,7 @@ core_initcall(evtchn_register); =20 void evtchn_register_pirq(int irq) { - BUG_ON(irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS); + BUG_ON(irq < PIRQ_BASE || irq - PIRQ_BASE >=3D NR_PIRQS); if (identity_mapped_irq(irq) || type_from_irq(irq) !=3D IRQT_UNBOUN= D) return; irq_info[irq] =3D mk_irq_info(IRQT_PIRQ, irq, 0);