>>> On 22.08.18 at 16:02, <aisa...@bitdefender.com> wrote: @@ -148,6 +145,9 @@ int hvm_save_one(struct domain *d, unsigned int typecode, unsigned int instance, > !hvm_sr_handlers[typecode].save ) > return -EINVAL; > > + if ( hvm_sr_handlers[typecode].kind == HVMSR_PER_VCPU && > + instance >= d->max_vcpus )
Indentation. You're checking instance only for per-vcpu records, but ... > @@ -155,7 +155,7 @@ int hvm_save_one(struct domain *d, unsigned int typecode, > unsigned int instance, > if ( !ctxt.data ) > return -ENOMEM; > > - if ( (rv = hvm_sr_handlers[typecode].save(d, &ctxt)) != 0 ) > + if ( (rv = hvm_sr_handlers[typecode].save(d->vcpu[instance], &ctxt)) != > 0 ) ... you _again_ use it as array index unconditionally. Please don't submit new versions without taking care of review comments given for earlier ones. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel