diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2010-05-19 04:32:29 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-06-14 02:12:24 +0200 |
commit | 9f069af5b62919151d76b37a3b168cbb34c874c3 (patch) | |
tree | a6ea761977c26adaada8e4b242832e1474cfbb58 /fs/proc/proc_devtree.c | |
parent | Linux 2.6.35-rc3 (diff) | |
download | linux-9f069af5b62919151d76b37a3b168cbb34c874c3.tar.xz linux-9f069af5b62919151d76b37a3b168cbb34c874c3.zip |
of: Drop properties with "/" in their name
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 <michael@ellerman.id.au>
Tested-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'fs/proc/proc_devtree.c')
-rw-r--r-- | 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 ce94801f48ca..d9396a4fc7ff 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); |