mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/3] OF: base: fix infinite loop in of_find_node_by_name
Date: Fri, 5 Jul 2013 08:50:43 +0200	[thread overview]
Message-ID: <20130705065043.GG516@pengutronix.de> (raw)
In-Reply-To: <51D5ACEA.4070809@gmail.com>

Hi Sebastian,

On Thu, Jul 04, 2013 at 07:12:10PM +0200, Sebastian Hesselbarth wrote:
> On 07/04/13 08:58, Sascha Hauer wrote:
> >On Thu, Jul 04, 2013 at 12:46:16AM +0200, Sebastian Hesselbarth wrote:
> >>of_find_node_by_name suffers from infinite looping, because it
> >>does not check for root node of the tree iterated over. This adds a
> >>check for parent pointer of last tested iterator entry, which is
> >>NULL for the root node.
> >>
> >
> >How about the following which adds the check to the iterator instead of
> >repeating it in the users.
> 
> Sascha,
> 
> I have taken your patch and successfully tested it for all node
> iterators.

I applied this one.

> of_for_each_node_with_property requires an additional patch
> to initialize an empty from node with root_node.
> 
> Also, there was a similar issue for the child iterator where I sent a
> patch ("OF: base: fix iterator in of_get_next_available_child") tonight.

I applied this one aswell.

What's missing now is the mentioned fix for
of_for_each_node_with_property, then we should be fine.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-07-05  6:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-03 22:46 [PATCH 0/3] OF: base: fix inifinite looping in node iterators Sebastian Hesselbarth
2013-07-03 22:46 ` [PATCH 1/3] OF: base: fix infinite loop in of_find_node_by_name Sebastian Hesselbarth
2013-07-04  6:58   ` Sascha Hauer
2013-07-04  7:13     ` Sebastian Hesselbarth
2013-07-04 17:12     ` Sebastian Hesselbarth
2013-07-05  6:50       ` Sascha Hauer [this message]
2013-07-05 21:19         ` [PATCH] OF: base: initalize from node in of_find_node_with_property Sebastian Hesselbarth
2013-07-09  6:55           ` Sascha Hauer
2013-07-03 22:46 ` [PATCH 2/3] OF: base: fix infinite loop in of_find_compatible_node Sebastian Hesselbarth
2013-07-03 22:46 ` [PATCH 3/3] OF: base: fix infinite loop in of_find_node_with_property Sebastian Hesselbarth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130705065043.GG516@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sebastian.hesselbarth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox