[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 6/6] xen/domain: Added debug safety in the domain_create() failure path
>>> On 07.03.18 at 20:12, <andrew.cooper3@xxxxxxxxxx> wrote: > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -399,6 +399,9 @@ struct domain *domain_create(domid_t domid, unsigned int > domcr_flags, > return d; > > fail: > + ASSERT(err < 0); /* Sanity check paths leading here. */ > + err = err ?: -EINVAL; /* Release build safety. */ Fundamentally I'm fine with this, but could you use a much less frequently used (and hence easier to identify) error code here? Like EILSEQ, ECHILD, or ENOTEMPTY (and I'm open to the use of other obscure ones)? We don't know what the cause of the error was, so what exact error code to report is pretty meaningless to the caller anyway. With that Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |