From: Michael Ellerman Date: Wed, 19 May 2010 02:32:29 +0000 (+0000) Subject: of: Drop properties with "/" in their name X-Git-Tag: v2.6.35-rc4~67^2~5 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=9f069af5b62919151d76b37a3b168cbb34c874c3;p=~emulex%2Finfiniband.git 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 Tested-by: Christian Kujau Signed-off-by: Grant Likely --- diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c index ce94801f48c..d9396a4fc7f 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);