lkml.org 
[lkml]   [2010]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 2.6.34-rc1] fs: fix bad string output
From
fix bad string output,[Bug #15589] 2.6.34-rc1: Badness at fs/proc/generic.c:316

Signed-off-by: Guanjun He <heguanbo@gmail.com>

---
diff -Nupr linux-2.6.34-rc1-orig/fs/proc/generic.c
linux-2.6.34-rc1/fs/proc/generic.c
--- linux-2.6.34-rc1-orig/fs/proc/generic.c 2010-04-21
13:47:18.000000000 +0800
+++ linux-2.6.34-rc1/fs/proc/generic.c 2010-04-21 16:42:11.000000000 +0800
@@ -313,7 +313,14 @@ static int __xlate_proc_name(const char
break;
}
if (!de) {
- WARN(1, "name '%s'\n", name);
+ cp = kstrdup(name);
+ if (cp) {
+ next = cp;
+ while(*next) {
+ if (*next == '/') *next++ = '_';
+ }
+ WARN(1, "name '%s'\n", cp);
+ }
return -ENOENT;
}
cp += len + 1;

\
 
 \ /
  Last update: 2010-04-21 11:01    [W:0.631 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site