From: Grant Likely <grant.likely@linaro.org>
To: linux-kernel@vger.kernel.org,
Nathan Fontenot <nfont@austin.ibm.com>,
Tyrel Datwyler <turtle.in.the.kernel@gmail.com>,
Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
devicetree@vger.kernel.org
Cc: Grant Likely <grant.likely@linaro.org>
Subject: [PATCH 07/10] of: Make sure attached nodes don't carry along extra children
Date: Wed, 23 Jul 2014 17:44:21 -0600 [thread overview]
Message-ID: <1406159064-21366-8-git-send-email-grant.likely@linaro.org> (raw)
In-Reply-To: <1406159064-21366-1-git-send-email-grant.likely@linaro.org>
The child pointer does not get cleared when attaching new nodes which
could cause the tree to be inconsistent. Clear the child pointer in
__of_attach_node() to be absolutely sure that the structure remains in a
consistent layout.
Signed-off-by: Grant Likely <grant.likely@linaro.org>
---
drivers/of/dynamic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c
index c875787fa394..b96d83100987 100644
--- a/drivers/of/dynamic.c
+++ b/drivers/of/dynamic.c
@@ -98,6 +98,7 @@ int of_property_notify(int action, struct device_node *np,
void __of_attach_node(struct device_node *np)
{
+ np->child = NULL;
np->sibling = np->parent->child;
np->allnext = np->parent->allnext;
np->parent->allnext = np;
--
1.9.1
next prev parent reply other threads:[~2014-07-23 23:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 23:44 [PATCH 00/10] of: Core devicetree changeset support Grant Likely
[not found] ` <1406159064-21366-1-git-send-email-grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-23 23:44 ` [PATCH 01/10] of/platform: Fix of_platform_device_destroy iteration of devices Grant Likely
2014-07-23 23:44 ` [PATCH 02/10] of: rename of_aliases_mutex to just of_mutex Grant Likely
2014-07-23 23:44 ` [PATCH 04/10] OF: Utility helper functions for dynamic nodes Grant Likely
2014-07-25 18:10 ` [PATCH 00/10] of: Core devicetree changeset support Nathan Fontenot
[not found] ` <53D29D87.4060708-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
2014-07-27 14:43 ` Grant Likely
2014-07-23 23:44 ` [PATCH 03/10] of: Move CONFIG_OF_DYNAMIC code into a separate file Grant Likely
2014-07-23 23:44 ` [PATCH 05/10] of: Create unlocked versions of node and property add/remove functions Grant Likely
2014-07-23 23:44 ` [PATCH 06/10] of: Make devicetree sysfs update functions consistent Grant Likely
2014-07-23 23:44 ` Grant Likely [this message]
2014-07-23 23:44 ` [PATCH 08/10] of: Move dynamic node fixups out of powerpc and into common code Grant Likely
2014-07-23 23:44 ` [PATCH 09/10] of: Reorder device tree changes and notifiers Grant Likely
2014-07-23 23:44 ` [PATCH 10/10] of: Transactional DT support Grant Likely
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=1406159064-21366-8-git-send-email-grant.likely@linaro.org \
--to=grant.likely@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nfont@austin.ibm.com \
--cc=pantelis.antoniou@konsulko.com \
--cc=turtle.in.the.kernel@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;
as well as URLs for NNTP newsgroup(s).