From: Dario Faggioli <dario.faggioli@citrix.com>
To: Harmandeep Kaur <write.harmandeep@gmail.com>
Cc: xen-devel@lists.xenproject.org, wei.liu2@citrix.com,
ian.jackson@eu.citrix.com, Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH] libxl: fix handling returns in libxl_get_version_info()
Date: Fri, 12 Feb 2016 12:00:06 +0100 [thread overview]
Message-ID: <1455274806.3148.347.camel@citrix.com> (raw)
In-Reply-To: <CAPtdW16S45rgw8rFR9tevaSTM5W4sB09epWYnTU1-gNGVOa6rA@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1832 bytes --]
On Fri, 2016-02-12 at 16:22 +0530, Harmandeep Kaur wrote:
> On Thu, Feb 11, 2016 at 3:18 PM, Dario Faggioli
> <dario.faggioli@citrix.com> wrote:
> >
> > Another thing that you should check, and probably quickly mention
> > too,
> > is whether or not the callers of these functions --the ones inside
> > xen.git of course-- are prepared to deal with this. I mean,
> > returning
> > NULL on failure of xc_version() is, IMO, the right thing to do here
> > anyway, but it is something important to know whether more work is
> > needed to fix the callers as well, or if we're just fine.
> >
> > To do so, search (e.g., with grep or cscope) for uses of
> > libxl_get_version_info inside the tools/ dir of xen.git. For
> > instance,
> > there is one such use in xl_cmdimpl.c, in the output_xeninfo()
> > function, which looks like it would interact well with this
> > patch...
> > Can you confirm this is the case also for all the other instances
> > and
> > note it down here?
>
> I think NULL may not be handled properly in auto_autoballoon() in
> tools/libxl/xl.c Other instances seems okay to me.
>
So, here:
info = libxl_get_version_info(ctx);
if (!info)
return 1; /* default to on */
Why do you think this is a problem? It looks like this call site is
actually prepared to see and handle a NULL return value...
> Should I fix the caller, too?
>
If there are issues with them, yes. If there aren't just put something
like "xxx callers are already fine xxx" in the changelog.
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
next prev parent reply other threads:[~2016-02-12 11:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 8:30 [PATCH] libxl: fix handling returns in libxl_get_version_info() Harmandeep Kaur
2016-02-11 9:48 ` Dario Faggioli
2016-02-11 10:21 ` Ian Campbell
2016-02-12 10:52 ` Harmandeep Kaur
2016-02-12 11:00 ` Dario Faggioli [this message]
2016-02-12 11:04 ` Harmandeep Kaur
2016-02-12 11:12 ` 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=1455274806.3148.347.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=write.harmandeep@gmail.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.