archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <>
To: <>
Subject: [PATCH] device-tree: Drop properties with "/" in their name
Date: Wed, 19 May 2010 22:32:29 +1000 (EST)	[thread overview]
Message-ID: <> (raw)

Some bogus firmwares include properties with "/" in their name. This
causes problems when creating the /proc/device-tree file system,
because the slash is taken to indicate a directory.

We don't care about those properties, and we don't want to encourage
them, so just throw them away when creating /proc/device-tree.

Signed-off-by: Michael Ellerman <>

Hi Christian, if you could test this new patch that'd be great, thanks!

 fs/proc/proc_devtree.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index ce94801..d9396a4 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -209,6 +209,9 @@ void proc_device_tree_add_node(struct device_node *np,
 	for (pp = np->properties; pp != NULL; pp = pp->next) {
 		p = pp->name;
+		if (strchr(p, '/'))
+			continue;
 		if (duplicate_name(de, p))
 			p = fixup_name(np, de, p);

             reply	other threads:[~2010-05-19 12:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19 12:32 Michael Ellerman [this message]
2010-05-20 13:51 ` [PATCH] device-tree: Drop properties with "/" in their name Michael Ellerman
2010-06-13  7:47 ` Christian Kujau
2010-06-13  8:15   ` Michael Ellerman

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:

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

  git send-email \ \ \ \ \ \ \

* 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).