From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Olaf Hering <olaf@aepfle.de>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH] libxlu: handle NULL pointer in xlu_cfg_destroy
Date: Fri, 8 May 2015 16:00:05 +0100 [thread overview]
Message-ID: <1431097205.2660.496.camel@citrix.com> (raw)
In-Reply-To: <20150507092617.GB29004@zion.uk.xensource.com>
On Thu, 2015-05-07 at 10:26 +0100, Wei Liu wrote:
> On Thu, May 07, 2015 at 08:54:26AM +0000, Olaf Hering wrote:
> > Handle NULL pointer passed to xlu_cfg_destroy. libvirt calls it in its
> > libxlDriverConfigDispose function. If the XLU_Config was not initialized
> > yet for some reason a crash would occour on cleanup.
"occur"
> > Avoid the crash just like libxl_ctx_free and xtl_logger_destroy do when
> > called from the same context.
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Wei Liu <wei.liu2@citrix.com>
>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
Applied, fixing the typo.
> > ---
> >
> > Not sure if this is correct, or if libvirt should call this function
> > only if cfg is valid.
> >
> > If this patch gets applied I suggest to apply this also to maintained
> > trees.
> >
> >
> > tools/libxl/libxlu_cfg.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/libxl/libxlu_cfg.c b/tools/libxl/libxlu_cfg.c
> > index 0a59b52..1d70909 100644
> > --- a/tools/libxl/libxlu_cfg.c
> > +++ b/tools/libxl/libxlu_cfg.c
> > @@ -159,6 +159,7 @@ void xlu__cfg_set_free(XLU_ConfigSetting *set) {
> > void xlu_cfg_destroy(XLU_Config *cfg) {
> > XLU_ConfigSetting *set, *set_next;
> >
> > + if (!cfg) return;
> > for (set= cfg->settings;
> > set;
> > set= set_next) {
prev parent reply other threads:[~2015-05-08 15:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 8:54 [PATCH] libxlu: handle NULL pointer in xlu_cfg_destroy Olaf Hering
2015-05-07 9:26 ` Wei Liu
2015-05-08 15:00 ` Ian Campbell [this message]
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=1431097205.2660.496.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=olaf@aepfle.de \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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.