lkml.org 
[lkml]   [2015]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] of/fdt: fix allocation size for device node path
Date
On Tue, 14 Apr 2015 12:36:05 +0800
, Ricky Liang <jcliang@chromium.org>
wrote:
> The allocation size of device node path is off by one which drops the
> '\0' terminator.
>
> Signed-off-by: Ricky Liang <jcliang@chromium.org>

This looks like something that should be backported to stable. Do you agree?

g.

> ---
> drivers/of/fdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 3a896c9..98a9e6e 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -172,7 +172,7 @@ static void * unflatten_dt_node(void *blob,
> if (!pathp)
> return mem;
>
> - allocl = l++;
> + allocl = ++l;
>
> /* version 0x10 has a more compact unit name here instead of the full
> * path. we accumulate the full path size using "fpsize", we'll rebuild
> --
> 2.1.2
>



\
 
 \ /
  Last update: 2015-04-15 14:41    [W:0.054 / U:7.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site