xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
@ 2014-02-26 12:13 Ian Campbell
  2014-02-26 12:14 ` Ian Campbell
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Campbell @ 2014-02-26 12:13 UTC (permalink / raw)
  To: xen-devel
  Cc: ian.jackson, julien.grall, tim, Ian Campbell, stefano.stabellini

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@citrix.com>
Cc: george.dunlap@citrix.com>
---
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;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
  2014-02-26 12:13 [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified Ian Campbell
@ 2014-02-26 12:14 ` Ian Campbell
  2014-02-27 14:39   ` George Dunlap
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ian Campbell @ 2014-02-26 12:14 UTC (permalink / raw)
  To: xen-devel
  Cc: George Dunlap, ian.jackson, julien.grall, tim, stefano.stabellini

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 <ian.campbell@citrix.com>
> Cc: george.dunlap@citrix.com>

Typo (extra ">") so Goerge's CC got missed out...

> ---
> 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;

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
  2014-02-26 12:14 ` Ian Campbell
@ 2014-02-27 14:39   ` George Dunlap
  2014-02-28 15:18   ` Julien Grall
  2014-03-13 10:55   ` Ian Campbell
  2 siblings, 0 replies; 9+ messages in thread
From: George Dunlap @ 2014-02-27 14:39 UTC (permalink / raw)
  To: Ian Campbell, xen-devel
  Cc: ian.jackson, julien.grall, tim, stefano.stabellini

On 02/26/2014 12:14 PM, 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 <ian.campbell@citrix.com>
>> Cc: george.dunlap@citrix.com>
> Typo (extra ">") so Goerge's CC got missed out...

I'm not aware (yet) of anything that might make us delay the release.

  -George

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
  2014-02-26 12:14 ` Ian Campbell
  2014-02-27 14:39   ` George Dunlap
@ 2014-02-28 15:18   ` Julien Grall
  2014-03-14 15:13     ` Ian Campbell
  2014-03-13 10:55   ` Ian Campbell
  2 siblings, 1 reply; 9+ messages in thread
From: Julien Grall @ 2014-02-28 15:18 UTC (permalink / raw)
  To: Ian Campbell, xen-devel
  Cc: George Dunlap, ian.jackson, tim, stefano.stabellini



On 26/02/14 20:14, 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 <ian.campbell@citrix.com>
>> Cc: george.dunlap@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>

>
> Typo (extra ">") so Goerge's CC got missed out...
>
>> ---
>> 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;
>
>

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
  2014-02-26 12:14 ` Ian Campbell
  2014-02-27 14:39   ` George Dunlap
  2014-02-28 15:18   ` Julien Grall
@ 2014-03-13 10:55   ` Ian Campbell
  2014-03-13 12:48     ` Ian Campbell
  2 siblings, 1 reply; 9+ messages in thread
From: Ian Campbell @ 2014-03-13 10:55 UTC (permalink / raw)
  To: xen-devel; +Cc: tim, julien.grall, ian.jackson, stefano.stabellini

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 <ian.campbell@citrix.com>
> > 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
  2014-03-13 10:55   ` Ian Campbell
@ 2014-03-13 12:48     ` Ian Campbell
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Campbell @ 2014-03-13 12:48 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson, julien.grall, tim, stefano.stabellini

On Thu, 2014-03-13 at 10:55 +0000, Ian Campbell wrote:
> 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 <ian.campbell@citrix.com>
> > > 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...

Nevermind, I misfiled Julien's ack.

Ian.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
  2014-02-28 15:18   ` Julien Grall
@ 2014-03-14 15:13     ` Ian Campbell
  2014-03-14 17:33       ` Ian Jackson
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Campbell @ 2014-03-14 15:13 UTC (permalink / raw)
  To: Julien Grall
  Cc: George Dunlap, ian.jackson, stefano.stabellini, tim, xen-devel

On Fri, 2014-02-28 at 23:18 +0800, Julien Grall wrote:
> 
> On 26/02/14 20:14, 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 <ian.campbell@citrix.com>
> >> Cc: george.dunlap@citrix.com>
> Acked-by: Julien Grall <julien.grall@linaro.org>

Thanks, applied.

Ian -- please can you queue for 4.4.1.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
  2014-03-14 15:13     ` Ian Campbell
@ 2014-03-14 17:33       ` Ian Jackson
  2014-04-04 15:11         ` Ian Jackson
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Jackson @ 2014-03-14 17:33 UTC (permalink / raw)
  To: Ian Campbell
  Cc: stefano.stabellini, George Dunlap, tim, Julien Grall, ian.jackson,
	xen-devel

Ian Campbell writes ("Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified"):
> Ian -- please can you queue for 4.4.1.

Queued.

Ian.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
  2014-03-14 17:33       ` Ian Jackson
@ 2014-04-04 15:11         ` Ian Jackson
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Jackson @ 2014-04-04 15:11 UTC (permalink / raw)
  To: Ian Campbell, Julien Grall, xen-devel, tim, stefano.stabellini,
	George Dunlap

Ian Jackson writes ("Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified"):
> Ian Campbell writes ("Re: [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified"):
> > Ian -- please can you queue for 4.4.1.
> 
> Queued.

Now pushed to staging-4.4.

Thanks.
Ian.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-04-04 15:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-26 12:13 [PATCH] libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified Ian Campbell
2014-02-26 12:14 ` Ian Campbell
2014-02-27 14:39   ` George Dunlap
2014-02-28 15:18   ` Julien Grall
2014-03-14 15:13     ` Ian Campbell
2014-03-14 17:33       ` Ian Jackson
2014-04-04 15:11         ` Ian Jackson
2014-03-13 10:55   ` Ian Campbell
2014-03-13 12:48     ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).