From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] x86: fix an off-by-one pirq range check Date: Wed, 30 Jun 2010 12:16:41 -0400 Message-ID: <20100630161641.GE5100@phenom.dumpdata.com> References: <4C2B02460200007800008B83@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4C2B02460200007800008B83@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Wed, Jun 30, 2010 at 07:37:26AM +0100, Jan Beulich wrote: > Signed-off-by: Jan Beulich Won't that make PV guest with only one IRQ passed through unable to ACK it? (and if the IRQ is not shared that is). This code does get executed when the PHYSDEVOP_eoi hypercall is made I believe. > > --- 2010-06-15.orig/xen/arch/x86/irq.c 2010-06-15 13:23:00.000000000 +0200 > +++ 2010-06-15/xen/arch/x86/irq.c 2010-06-29 10:15:13.000000000 +0200 > @@ -1027,7 +1027,7 @@ static void __pirq_guest_eoi(struct doma > > int pirq_guest_eoi(struct domain *d, int irq) > { > - if ( (irq < 0) || (irq > d->nr_pirqs) ) > + if ( (irq < 0) || (irq >= d->nr_pirqs) ) > return -EINVAL; > > __pirq_guest_eoi(d, irq); > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel