Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752226AbaFODgr (ORCPT ); Sat, 14 Jun 2014 23:36:47 -0400 Received: from mail-pb0-f43.google.com ([209.85.160.43]:39781 "EHLO mail-pb0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493AbaFODgp (ORCPT ); Sat, 14 Jun 2014 23:36:45 -0400 Message-ID: <539D14CA.1060105@gmail.com> Date: Sat, 14 Jun 2014 20:36:42 -0700 From: Frank Rowand Reply-To: frowand.list@gmail.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Grant Likely , Pantelis Antoniou CC: Rob Herring , Rob Herring , "devicetree@vger.kernel.org" , Linux Kernel list Subject: Re: [RFC PATCH] OF: fix of_find_node_by_path() assumption that of_allnodes is root References: <539A91E2.7000606@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/14/2014 8:00 AM, Grant Likely wrote: > On Fri, Jun 13, 2014 at 4:06 PM, Grant Likely wrote: >> On Fri, Jun 13, 2014 at 2:52 PM, Rob Herring wrote: >>> On Fri, Jun 13, 2014 at 12:53 AM, Frank Rowand wrote: >>>> From: Frank Rowand >>>> >>>> Pantelis Antoniou reports that of_find_node_by_path() is borked because >>>> of_allnodes is not guaranteed to contain the root of the tree after using >>>> any of the dynamic update functions because some other nodes ends up as >>>> of_allnodes. >>>> >>>> Fixes: c22e650e66b8 of: Make of_find_node_by_path() handle /aliases >>> >>> Is it not possible to do a fix in of_find_node_by_path instead? I just >>> wonder if this could have any other unintended side-effects on >>> of_attach_node's behavior. >> >> Given that I'm going to replace the custom list with list_head which >> makes this problem go away, I think this solution is fine. >> >> Acked-by: Grant Likely > > That said, the following might be better because it would guarantee > that children always appear after parents... < snip > I agree, I like that better. Patch respun, v2 will be sent as a reply to this email. Pantelis, can you test v2 please? Thanks, Frank -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/