mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: GuanJun He <heguanbo@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.34-rc1] proc: fix badness in fs/proc/generic.c
Date: Thu, 22 Apr 2010 09:09:19 +0300	[thread overview]
Message-ID: <o2gb6fcc0a1004212309scfd2e385p21128db152c164d0@mail.gmail.com> (raw)
In-Reply-To: <k2hccf7f6161004212110ze02b6cfbr2b5082441ea6a4d9@mail.gmail.com>

On Thu, Apr 22, 2010 at 7:10 AM, GuanJun He <heguanbo@gmail.com> wrote:
> fix badness in fs/proc/generic.c,  Bug 15589 -  2.6.34-rc1: Badness at
> fs/proc/generic.c:316
> this is just to get least waste.

This is already fixed by powerpc folks, I believe.
Without memory leak.

> --- linux-2.6.34-rc1.orig/fs/proc/generic.c
> +++ linux-2.6.34-rc1/fs/proc/generic.c
> @@ -313,7 +313,15 @@ static int __xlate_proc_name(const char
>                                break;
>                }
>                if (!de) {
> -                       WARN(1, "name '%s'\n", name);
> +                       char *dup = kstrdup(name, GFP_KERNEL);
> +                       if (dup) {
> +                               cp = dup;
> +                               while(*dup) {
> +                                       if (*dup == '/')
> +                                               *dup++ = '_';
> +                               }
> +                               WARN(1, "name '%s'\n", cp);
> +                       }

  reply	other threads:[~2010-04-22  6:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22  4:10 GuanJun He
2010-04-22  6:09 ` Alexey Dobriyan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-04-21 11:09 GuanJun He
2010-04-21 16:27 ` Américo Wang

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=o2gb6fcc0a1004212309scfd2e385p21128db152c164d0@mail.gmail.com \
    --to=adobriyan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®