libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
PATCH 1/1 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.
---
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(-)
tools/libxl/libxl_arm.c +4 -2
@@ -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;
Signature · 1 line
1.7.10.4
Quoted 7 lines · Ian Campbell
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 <[email protected]>
Typo (extra ">") so Goerge's CC got missed out...
Quoted 25 lines
---
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(-)tools/libxl/libxl_arm.c +4
-2@@ -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;
Quoted 9 lines · Ian Campbell
Quoted 7 lines · Ian Campbell
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 <[email protected]>Typo (extra ">") so Goerge's CC got missed out...
I'm not aware (yet) of anything that might make us delay the release.
-George
Julien Grall
Acked-byQuoted 8 lines · Ian Campbell
Quoted 7 lines · Ian Campbell
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 <[email protected]>
Quoted 30 lines
Typo (extra ">") so Goerge's CC got missed out...
Quoted 25 lines
---
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(-)tools/libxl/libxl_arm.c +4
-2@@ -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;
Signature · 1 line
Julien Grall
Ian Campbell
AppliedQuoted 11 lines · Julien Grall
Quoted 8 lines · Ian Campbell
Quoted 7 lines · Ian Campbell
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 <[email protected]>Acked-by Julien Grall <[email protected]>
Thanks, applied.
Ian -- please can you queue for 4.4.1.
Ian Campbell writes ("Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified"):
Quoted 1 line
Ian -- please can you queue for 4.4.1.
Queued.
Ian.
Ian Jackson writes ("Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified"):
Quoted 4 lines
Ian Campbell writes ("Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified"):
Quoted 1 line
Ian -- please can you queue for 4.4.1.
Queued.
Now pushed to staging-4.4.
Thanks.
Ian.
Quoted 10 lines · Ian Campbell
Quoted 7 lines · Ian Campbell
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 <[email protected]>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...
Quoted 33 lines
Quoted 16 lines
---
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(-)tools/libxl/libxl_arm.c +0
-0@@ -164,8 +164,10 @@ static int make_chosen_node(libxl__gc *gc, void *fdt, res =fdt_begin_node (fdt,"chosen" );if (res)return res;tools/libxl/libxl_arm.c static int make_chosen_node(libxl__gc *gc, void *fdt, · line 173
Quoted 10 lines
tools/libxl/libxl_arm.c +4
-2- 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
[email protected]
http://lists.xen.org/xen-devel
Quoted 10 lines · Ian Campbell
Quoted 9 lines · Ian Campbell
Quoted 7 lines · Ian Campbell
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 <[email protected]>
Quoted 6 lines
Quoted 1 line
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...
Nevermind, I misfiled Julien's ack.
Ian.