> -----Original Message-----
> From: Roger Pau Monne <roger....@citrix.com>
> Sent: 10 September 2019 14:42
> To: Jan Beulich <jbeul...@suse.com>
> Cc: Andrew Cooper <andrew.coop...@citrix.com>; Paul Durrant 
> <paul.durr...@citrix.com>; xen-
> de...@lists.xenproject.org; Wei Liu <w...@xen.org>
> Subject: Re: [PATCH v2 01/11] ioreq: fix hvm_all_ioreq_servers_add_vcpu fail 
> path cleanup
> 
> On Tue, Sep 10, 2019 at 03:35:06PM +0200, Jan Beulich wrote:
> > On 10.09.2019 15:33, Roger Pau Monné  wrote:
> > > On Tue, Sep 10, 2019 at 03:28:57PM +0200, Jan Beulich wrote:
> > >> On 03.09.2019 18:14, Roger Pau Monne wrote:
> > >>> --- a/xen/arch/x86/hvm/ioreq.c
> > >>> +++ b/xen/arch/x86/hvm/ioreq.c
> > >>> @@ -1195,7 +1195,7 @@ int hvm_all_ioreq_servers_add_vcpu(struct domain 
> > >>> *d, struct vcpu *v)
> > >>>      return 0;
> > >>>
> > >>>   fail:
> > >>> -    while ( id-- != 0 )
> > >>> +    while ( id++ != MAX_NR_IOREQ_SERVERS )
> > >>>      {
> > >>>          s = GET_IOREQ_SERVER(d, id);
> > >>
> > >> With Paul's R-b I was about to commit this, but doesn't this
> > >> need to be ++id? (If so, I'll be happy to fix while committing.)
> > >
> > > The increment is already done in the loop condition.
> >
> > That's the increment I mean. I'm sorry for the ambiguity; I
> > didn't want to cut too much of the context.
> 
> Oh sorry, yes I think you are correct, or else we would overrun the
> array by one.

Indeed. I should have spotted that.

  Paul

> 
> Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to