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

Re: [Xen-devel] [PATCH v3] dom variable error handled in Xenstore



On Thu, 2015-10-29 at 10:07 +0000, Wei Liu wrote:
> On Thu, Oct 29, 2015 at 12:42:18AM +0530, Lasya Venneti wrote:

> > I must also add errno.h header to the file, I forgot to do that. I
> > shall
> > do so in the next version.
> > 
> 
> Other xc functions that issue hypercall (that is, you can trace the
> call chain to do_xen_hypercall) end up calling ioctl in both Linux
> and
> NetBSD, and they have the same behaviour to return -1 on error and
> set
> errno to appropriate *Xen* errno.
> 
Aha, I just wrote an email very similar to this... this is a typical
example of a race condition, someone should invent spinlocks for RL !!
:-D

> As for xc_dom_allocate, the only failure path at the moment is malloc
> failure, which would be appropriate to use ENOMEM to represent.
> 
> However if it causes too many faffs, you can just set rv to -1 and
> return to caller. I think the main point is to handle the error,
> either
> -1 or ENOMEM is fine by me.
> 
Agreed but, I personally prefer -1, for consistency. :-)

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

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

 


Rackspace

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