From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: GuanJun He <heguanbo@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.34-rc1] fs: fix bad string output
Date: Thu, 22 Apr 2010 00:31:05 +0800 [thread overview]
Message-ID: <20100421163105.GC13861@hack> (raw)
In-Reply-To: <x2uccf7f6161004210159qe7337037td6054d3e33ce350c@mail.gmail.com>
On Wed, Apr 21, 2010 at 04:59:40PM +0800, GuanJun He wrote:
>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>
>
NACK.
This even doesn't pass compiling. Check the prototype of kstrdup().
Also, we already had a patch:
https://patchwork.kernel.org/patch/93658/
>---
>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;
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
--
Live like a child, think like the god.
prev parent reply other threads:[~2010-04-21 16:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-21 8:59 [PATCH 2.6.34-rc1] fs: fix bad string output GuanJun He
2010-04-21 16:31 ` Américo Wang [this message]
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=20100421163105.GC13861@hack \
--to=xiyou.wangcong@gmail.com \
--cc=heguanbo@gmail.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.