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

Re: [Xen-devel] [PATCH 1/2] x86/mm: Plumb a error return through {paging, hap, shadow}_vcpu_init()



>>> On 30.01.17 at 18:26, <andrew.cooper3@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -384,7 +384,8 @@ int vcpu_initialise(struct vcpu *v)
>  
>      if ( !is_idle_domain(d) )
>      {
> -        paging_vcpu_init(v);
> +        if ( (rc = paging_vcpu_init(v)) )
> +            return rc;
>  
>          if ( (rc = vcpu_init_fpu(v)) != 0 )
>              return rc;

With the function so far having been impossible to fail, it was also
pretty clear that no meaningful cleanup would need doing after it.
Now that it can fail, is it really appropriate to return without
undoing its effects if vcpu_init_fpu() fails?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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