[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.4] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
commit a77a6c892c573f8750d84e951461f6f27fc7e111 Author: Ian Campbell <ian.campbell@xxxxxxxxxx> AuthorDate: Wed Feb 26 12:13:00 2014 +0000 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Fri Apr 4 16:10:40 2014 +0100 libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified 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 <ian.campbell@xxxxxxxxxx> Acked-by: Julien Grall <julien.grall@xxxxxxxxxx> Cc: george.dunlap@xxxxxxxxxx> (cherry picked from commit 3647a486ec05b1e01930ff299b18fc2b632e2cb0) --- tools/libxl/libxl_arm.c | 6 ++++-- 1 files 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; -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.4 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |