Skip to content

Commit

Permalink
of: Drop properties with "/" in their name
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Ellerman authored and Grant Likely committed Jun 14, 2010
1 parent 7e27d6e commit 9f069af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/proc/proc_devtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9f069af

Please sign in to comment.