lkml.org 
[lkml]   [2014]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] of: handle NULL node in of_get_next_available_child
Date
On Tue, 27 May 2014 10:36:10 -0700, Florian Fainelli <f.fainelli@gmail.com> wrote:
> Hi Grant,
>
> 2014-05-27 4:19 GMT-07:00 Grant Likely <grant.likely@linaro.org>:
> > On Fri, 23 May 2014 12:43:11 -0700, Florian Fainelli <f.fainelli@gmail.com> wrote:
> >> Add an early check for the node argument in
> >> of_get_next_available_child() to avoid dereferencing a NULL node pointer
> >> a few lines after.
> >>
> >> CC: Daniel Mack <zonque@gmail.com>
> >> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> >
> > Is there a bug that exposed this path?
>
> Daniel sent a patch recently [1] which makes us call
> for_each_available_child_of_node() on a potentially NULL node
> argument.

And yet in your reply to that patch you argued that the NULL check
should be in the caller!

Anyway, this isn't a big deal. Post a patch fixing both and I'll apply
it.

g.


\
 
 \ /
  Last update: 2014-05-27 23:21    [W:2.208 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site