* [PATCH] device-tree: Drop properties with "/" in their name
@ 2010-05-19 12:32 Michael Ellerman
2010-05-20 13:51 ` Michael Ellerman
2010-06-13 7:47 ` Christian Kujau
0 siblings, 2 replies; 4+ messages in thread
From: Michael Ellerman @ 2010-05-19 12:32 UTC (permalink / raw)
To: lists; +Cc: linuxppc-dev, monstr, microblaze-uclinux
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>
---
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);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] device-tree: Drop properties with "/" in their name
2010-05-19 12:32 [PATCH] device-tree: Drop properties with "/" in their name Michael Ellerman
@ 2010-05-20 13:51 ` Michael Ellerman
2010-06-13 7:47 ` Christian Kujau
1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2010-05-20 13:51 UTC (permalink / raw)
To: linuxppc-dev; +Cc: lists, microblaze-uclinux, monstr
[-- Attachment #1: Type: text/plain, Size: 709 bytes --]
On Wed, 2010-05-19 at 22:32 +1000, Michael Ellerman wrote:
> 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>
> ---
>
> Hi Christian, if you could test this new patch that'd be great, thanks!
And thanks to Christian for testing it:
https://bugzilla.kernel.org/show_bug.cgi?id=15589
Tested-by: Christian Kujau <lists@nerdbynature.de>
cheers
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] device-tree: Drop properties with "/" in their name
2010-05-19 12:32 [PATCH] device-tree: Drop properties with "/" in their name Michael Ellerman
2010-05-20 13:51 ` Michael Ellerman
@ 2010-06-13 7:47 ` Christian Kujau
2010-06-13 8:15 ` Michael Ellerman
1 sibling, 1 reply; 4+ messages in thread
From: Christian Kujau @ 2010-06-13 7:47 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, monstr, LKML, microblaze-uclinux
On Wed, 19 May 2010 at 22:32, Michael Ellerman wrote:
> 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>
> ---
>
> Hi Christian, if you could test this new patch that'd be great, thanks!
I've tested the patch, the Badness is gone and the system is stable as
ever. Will this be pushed to 2.6.35?
Thanks,
Christian.
> 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);
>
> --
> 1.7.0.4
>
>
>
--
BOFH excuse #334:
50% of the manual is in .pdf readme files
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] device-tree: Drop properties with "/" in their name
2010-06-13 7:47 ` Christian Kujau
@ 2010-06-13 8:15 ` Michael Ellerman
0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2010-06-13 8:15 UTC (permalink / raw)
To: Christian Kujau; +Cc: monstr, LKML, linuxppc-dev, microblaze-uclinux
[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]
On Sun, 2010-06-13 at 00:47 -0700, Christian Kujau wrote:
> On Wed, 19 May 2010 at 22:32, Michael Ellerman wrote:
> > 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>
> > ---
> >
> > Hi Christian, if you could test this new patch that'd be great, thanks!
>
> I've tested the patch, the Badness is gone and the system is stable as
> ever. Will this be pushed to 2.6.35?
Hopefully yes :)
Looks like Ben has deferred it to Grant in patchwork, and he is pretty
busy I think with other OF patches ATM. Maybe he'll grab it or Ben can
pick it up .. guys ? :)
http://patchwork.ozlabs.org/patch/52978/
cheers
> > 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);
> >
> > --
> > 1.7.0.4
> >
> >
> >
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-13 8:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19 12:32 [PATCH] device-tree: Drop properties with "/" in their name Michael Ellerman
2010-05-20 13:51 ` Michael Ellerman
2010-06-13 7:47 ` Christian Kujau
2010-06-13 8:15 ` Michael Ellerman
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).