[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
> -----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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |