All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>, Lasya Venneti <comethalley61@gmail.com>
Cc: xen-devel@lists.xenproject.org,
	Ian Campbell <ian.campbell@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Lars Kurth <lars.kurth@citrix.com>
Subject: Re: [PATCH v3] dom variable error handled in Xenstore
Date: Thu, 29 Oct 2015 11:11:57 +0100	[thread overview]
Message-ID: <1446113517.28782.50.camel@citrix.com> (raw)
In-Reply-To: <20151029100728.GB8097@zion.uk.xensource.com>


[-- Attachment #1.1: Type: text/plain, Size: 1325 bytes --]

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 #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

  reply	other threads:[~2015-10-29 10:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28  0:12 [PATCH v3] dom variable error handled in Xenstore Lasya
2015-10-28  1:00 ` Dario Faggioli
2015-10-28 19:12   ` Lasya Venneti
2015-10-29 10:07     ` Wei Liu
2015-10-29 10:11       ` Dario Faggioli [this message]
2015-10-29 14:58         ` Lasya Venneti
2015-10-30 14:28           ` Dario Faggioli
2015-11-02 12:03             ` Ian Campbell
2015-10-29 10:08     ` Dario Faggioli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1446113517.28782.50.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=comethalley61@gmail.com \
    --cc=george.dunlap@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=lars.kurth@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.