From: Ian Campbell Subject: Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified Date: Thu, 13 Mar 2014 10:55:53 +0000 Message-ID: <1394708153.25873.39.camel@kazak.uk.xensource.com> References: <1393416780-10912-1-git-send-email-ian.campbell@citrix.com> <1393416841.18730.38.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1393416841.18730.38.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: tim@xen.org, julien.grall@linaro.org, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Wed, 2014-02-26 at 12:14 +0000, Ian Campbell wrote: > On Wed, 2014-02-26 at 12:13 +0000, Ian Campbell wrote: > > Otherwise we deference a NULL pointer. > > > > I saw this while experimenting with libvirt on Xen on ARM, xl already checks > > that the command line is non NULL and provides "" as a default. > > > > Signed-off-by: Ian Campbell > > Cc: george.dunlap@citrix.com> > > Typo (extra ">") so Goerge's CC got missed out... Dropping George since 4.4 is out the door so I'm sure he doesn't care any more. Ping to the rest of you... > > > --- > > This is a pretty obvious fix and would be nice to have if we are taking any > > more fixes for other stuff , but otherwise I think we can leave to 4.4.1 quite > > happily. > > --- > > tools/libxl/libxl_arm.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c > > index 0a1c8c5..0cfd0cf 100644 > > --- a/tools/libxl/libxl_arm.c > > +++ b/tools/libxl/libxl_arm.c > > @@ -164,8 +164,10 @@ static int make_chosen_node(libxl__gc *gc, void *fdt, > > res = fdt_begin_node(fdt, "chosen"); > > if (res) return res; > > > > - res = fdt_property_string(fdt, "bootargs", info->u.pv.cmdline); > > - if (res) return res; > > + if (info->u.pv.cmdline) { > > + res = fdt_property_string(fdt, "bootargs", info->u.pv.cmdline); > > + if (res) return res; > > + } > > > > res = fdt_end_node(fdt); > > if (res) return res; > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel