Re: [Bug #15589] 2.6.34-rc1: Badness at fs/proc/generic.c:316

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christian Kujau
Date: Sunday, May 9, 2010 - 3:27 pm

On Sun, 9 May 2010 at 23:17, Rafael J. Wysocki wrote:

The bug is still present in -rc6, but Michael Ellerman has a patch[0] 
which made the warning go away.

@Michael: will you post your patch with a Sign-Off, so that it can be 
          pushed into mainline?

Thanks,
Christian.

[0] http://patchwork.ozlabs.org/patch/50557/

diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index ce94801..019581d 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -176,6 +176,24 @@ retry:
 	return fixed_name;
 }
 
+static const char *unslash_name(const char *name)
+{
+	char *p, *fixed_name;
+
+	fixed_name = kstrdup(name, GFP_KERNEL);
+	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.
  */
@@ -212,6 +230,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;
-- 
BOFH excuse #188:

..disk or the processor is on fire.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.34-rc6-git6: Reported regressions from 2.6.33, Rafael J. Wysocki, (Sun May 9, 2:13 pm)
[Bug #15505] No more b43 wireless interface since 2.6.34-rc1, Rafael J. Wysocki, (Sun May 9, 2:13 pm)
[Bug #15589] 2.6.34-rc1: Badness at fs/proc/generic.c:316, Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15590] 2.6.34-rc1: regression: ^Z no longer stops sound, Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15669] INFO: suspicious rcu_dereference_check(), Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15601] [BUG] SLOB breaks Crypto, Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15713] hackbench regression due to commit 9dfc6e68bfe6e, Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15704] [r8169] WARNING: at net/sched/sch_generic.c, Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15768] Incorrectly calculated free blocks result in ..., Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15717] bluetooth oops, Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15729] BUG: physmap modprobe & rmmod, Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15805] reiserfs locking, Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15862] 2.6.34-rc4/5: iwlagn unusable until reload, Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15880] Very bad regression from 2.6.33 as of 1600f9def, Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15951] commit 9630bdd9 changes behavior of the poweroff, Rafael J. Wysocki, (Sun May 9, 2:17 pm)
[Bug #15935] [BUG] btrfs: report a direct-IO bug, Rafael J. Wysocki, (Sun May 9, 2:17 pm)
Re: [Bug #15805] reiserfs locking, Frederic Weisbecker, (Sun May 9, 3:10 pm)
Re: [Bug #15589] 2.6.34-rc1: Badness at fs/proc/generic.c:316, Christian Kujau, (Sun May 9, 3:27 pm)
Re: 2.6.34-rc6-git6: Reported regressions from 2.6.33, Nick Bowler, (Mon May 10, 9:07 am)
RE: [Bug #15729] BUG: physmap modprobe & rmmod, H Hartley Sweeten, (Mon May 10, 9:23 am)
Re: [Bug #15704] [r8169] WARNING: at net/sched/sch_generic.c, Sergey Senozhatsky, (Wed May 12, 6:47 am)
Re: [Bug #15601] [BUG] SLOB breaks Crypto, Pekka Enberg, (Sat May 22, 3:22 am)
Re: [Bug #15601] [BUG] SLOB breaks Crypto, Herbert Xu, (Sat May 22, 3:31 am)
Re: [Bug #15601] [BUG] SLOB breaks Crypto, Pekka Enberg, (Sat May 22, 3:34 am)