[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 01/11] ioreq: fix hvm_all_ioreq_servers_add_vcpu fail path cleanup


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • Date: Tue, 10 Sep 2019 13:53:16 +0000
  • Accept-language: en-GB, en-US
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=Paul.Durrant@xxxxxxxxxx; spf=Pass smtp.mailfrom=Paul.Durrant@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 10 Sep 2019 13:53:23 +0000
  • Ironport-sdr: VMkCYkp+Ms0mrh6RJJLWKztp8x6zXDIa4+xzh/joVT3J7pUL6OOs0vtFJoo61l/aa+yv0lXsLh VCgAKdFA6Q01lLU5NOcaYIyUbRcwSdeed9WWW/1V7+UgQE+b9iES4luhuzdYEeYD/tgEijw44o S26je+1+c9f2NpeRvOiAAgoe0rJmQg/CjkwV8KvCslVMfhhLNPnr944muiQD4XguI02bqMoTCS O/zKNYkEplb1fs4Wt6p4PpZI4wqp111DvBzSXk1XUCmz1NcwmmM/lwgQdq3CSq6Olt6lEPeLIt liA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVYnKwXKcNObHIYUmMOM+OmK6Ekack0PiAgAABNICAAACEAIAAAf2AgAAkefA=
  • Thread-topic: [PATCH v2 01/11] ioreq: fix hvm_all_ioreq_servers_add_vcpu fail path cleanup

> -----Original Message-----
> From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
> Sent: 10 September 2019 14:42
> To: Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; Paul Durrant 
> <Paul.Durrant@xxxxxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx; Wei Liu <wl@xxxxxxx>
> 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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.