From: Michael Ellerman <michael@ellerman.id.au>
To: Christian Kujau <lists@nerdbynature.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
linuxppc-dev@ozlabs.org, schwab@linux-m68k.org,
Kernel Testers List <kernel-testers@vger.kernel.org>,
adobriyan@gmail.com, Maciej Rutecki <maciej.rutecki@gmail.com>
Subject: Re: [Bug #15589] 2.6.34-rc1: Badness at fs/proc/generic.c:316
Date: Tue, 20 Apr 2010 22:18:18 +1000 [thread overview]
Message-ID: <1271765898.4324.2.camel@concordia> (raw)
In-Reply-To: <alpine.DEB.2.01.1004192339190.13016@bogon.housecafe.de>
On Mon, 2010-04-19 at 23:45 -0700, Christian Kujau wrote:
> On Tue, 20 Apr 2010 at 05:19, Rafael J. Wysocki wrote:
> > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=15589
> > Subject : 2.6.34-rc1: Badness at fs/proc/generic.c:316
> > Submitter : Christian Kujau <lists@nerdbynature.de>
> > Date : 2010-03-13 23:53 (38 days old)
> > Message-ID : <alpine.DEB.2.01.1003131544340.5493@bogon.housecafe.de>
> > References : http://marc.info/?l=linux-kernel&m=126852442903680&w=2
>
> Yes, unless something in this area has changed from -rc4 to -rc5, this is
> still printed during boot:
>
>
> device-tree: Duplicate name in /cpus/PowerPC,G4@0, renamed to "l2-cache#1"
> name 'pulses/rev'
> ------------[ cut here ]------------
Don't cut here, sigh.
> Badness at fs/proc/generic.c:317
Try this 100% unbuilt, 100% untested patch.
cheers
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index f8650dc..9502b48 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -175,6 +175,24 @@ retry:
return fixed_name;
}
+static const char *unslash_name(const char *name)
+{
+ char *p, *fixed_name;
+
+ fixed_name = kstrdup(name);
+ if (!fixed_name) {
+ printk(KERN_ERR "device-tree: Out of memory trying to unslash "
+ "name \"%s\"\n", name);
+ return name;
+ }
+
+ p = fixed_name;
+ while ((p = strstr(p, "/")))
+ *p++ = '_';
+
+ return fixed_name;
+}
+
/*
* Process a node, adding entries for its children and its properties.
*/
@@ -211,6 +229,9 @@ void proc_device_tree_add_node(struct device_node *np,
if (duplicate_name(de, p))
p = fixup_name(np, de, p);
+ if (strstr(p, "/"))
+ p = unslash_name(p);
+
ent = __proc_device_tree_add_prop(de, pp, p);
if (ent == NULL)
break;
next prev parent reply other threads:[~2010-04-20 12:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <deuQKFRcc0B.A.3EG.BRSzLB@tosh>
[not found] ` <YeFfFNFyTSF.A.vUB.fSSzLB@tosh>
2010-04-20 6:45 ` [Bug #15589] 2.6.34-rc1: Badness at fs/proc/generic.c:316 Christian Kujau
2010-04-20 12:18 ` Michael Ellerman [this message]
2010-04-20 18:15 ` Christian Kujau
2010-04-20 20:53 ` Andreas Schwab
2010-04-21 0:25 ` Michael Ellerman
2010-04-21 15:55 ` Alexey Dobriyan
2010-04-21 0:21 ` Michael Ellerman
2010-04-21 4:57 ` Rafael J. Wysocki
[not found] <10aqDnTJcLO.A.mLE.48y5LB@chimera>
[not found] ` <HqroMXsT-CJ.A.DnG.m_y5LB@chimera>
2010-05-09 22:27 ` Christian Kujau
2010-05-09 23:34 ` 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1271765898.4324.2.camel@concordia \
--to=michael@ellerman.id.au \
--cc=adobriyan@gmail.com \
--cc=kernel-testers@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=lists@nerdbynature.de \
--cc=maciej.rutecki@gmail.com \
--cc=rjw@sisk.pl \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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