All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] linux-2.6.17-rc3-git13 fs/proc/array.c
Date: Mon, 08 May 2006 06:44:12 +0000	[thread overview]
Message-ID: <20060508064412.GA7466@us.ibm.com> (raw)
In-Reply-To: <445EDBCA.9080702@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1927 bytes --]

On 08.05.2006 [01:48:58 -0400], Anne Thrax wrote:
> do_task_stat() was using too much stack
> from make checkstack:
> 0x080eae08 do_task_stat:                                1752
> 
> So I took almost all the variables used in the function and made a new
> structure do_task_stat_vars, and dynamically allocated it in the
> function.  This is supposed to be a quick hack, and hopefully the
> authors will really do something about it.
> 
> Signed off by: Anne Thrax <foobarfoobarfoobar@gmail.com>

Signed-off-by, please.

And, I must ask, is your name actually Anne Thrax? If not, please use
your real name.

> --- linux-2.6.17-rc3-git13/fs/proc/array.c      2006-05-07 
> 23:01:50.000000000 -0400
> +++ linux-uml/fs/proc/array.c   2006-05-08 01:31:12.000000000 -0400
> @@ -316,7 +316,7 @@

Patch appears to be line-wrapped :(

>  static int do_task_stat(struct task_struct *task, char * buffer, int 
> whole)
>  {
> -       unsigned long vsize, eip, esp, wchan = ~0UL;
> +       /* unsigned long vsize, eip, esp, wchan = ~0UL;
>         long priority, nice;
>         int tty_pgrp = -1, tty_nr = 0;
>         sigset_t sigign, sigcatch;
> @@ -332,35 +332,49 @@
>         unsigned long rsslim = 0;
>         struct task_struct *t;
>         char tcomm[sizeof(task->comm)];
> +       */
> +       struct do_task_stat_vars *vars;
> +       vars = kmalloc(sizeof(struct do_task_stat_vars), GFP_KERNEL);

What happens if this kmalloc fails? Can do_task_stat() return ENOMEM?
What happens if it does -- will that change userspace in some way
(generally unacceptable)?

<snip>

> @@ -459,6 +473,9 @@
>                 task->policy);
>         if(mm)
>                 mmput(mm);
> +
> +       int res = vars->res;

I'm almost positive that compilation would have complained about
declaring a variable in the middle of a block. Did you compile-test?

Thanks,
Nish

-- 
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

  reply	other threads:[~2006-05-08  6:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-08  5:48 [KJ] [PATCH] linux-2.6.17-rc3-git13 fs/proc/array.c Anne Thrax
2006-05-08  6:44 ` Nishanth Aravamudan [this message]
2006-05-08  7:27 ` Anne Thrax
2006-05-08 15:18 ` Nishanth Aravamudan
2006-05-08 16:40 ` Greg KH
2006-05-08 16:58 ` Nishanth Aravamudan
2006-05-08 16:58 ` Matthew Wilcox
2006-05-08 17:49 ` Greg KH
2006-05-09 19:37 ` Matthew Wilcox
2006-05-09 19:44 ` Alexey Dobriyan
2006-05-10 22:15 ` Randy.Dunlap
2006-05-11  0:46 ` Nishanth Aravamudan

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=20060508064412.GA7466@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=kernel-janitors@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.