lkml.org 
[lkml]   [2017]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] of: fdt: add missing allocation-failure check
On Wed, May 17, 2017 at 05:29:09PM +0200, Johan Hovold wrote:
> The memory allocator passed to __unflatten_device_tree() (e.g. a wrapped
> kzalloc) can fail so add the missing sanity check to avoid dereferencing
> a NULL pointer.
>
> Fixes: fe14042358fa ("of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree")
> Cc: stable <stable@vger.kernel.org> # 2.6.38
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> drivers/of/fdt.c | 3 +++
> 1 file changed, 3 insertions(+)

Applied, thanks.

Rob

\
 
 \ /
  Last update: 2017-05-17 18:38    [W:0.028 / U:2.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site