mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Patch for show_task
Date: Thu, 3 Apr 2003 22:43:46 -0800	[thread overview]
Message-ID: <20030403224346.51d9680e.akpm@digeo.com> (raw)
In-Reply-To: <20030404013829.A30163@devserv.devel.redhat.com>

Pete Zaitcev <zaitcev@redhat.com> wrote:
>
> Andrew, bkbits says you changed the line above to be p->thread_info.
> Unfortunately, there's another.
> 
> --- linux-2.5.66/kernel/sched.c	2003-03-24 14:01:16.000000000 -0800
> +++ linux-2.5.66-sparc/kernel/sched.c	2003-04-03 22:33:29.000000000 -0800
> @@ -2197,7 +2197,7 @@
>  		unsigned long * n = (unsigned long *) (p->thread_info+1);
>  		while (!*n)
>  			n++;
> -		free = (unsigned long) n - (unsigned long)(p+1);
> +		free = (unsigned long) n - (unsigned long) (p->thread_info+1);
>  	}
>  	printk("%5lu %5d %6d ", free, p->pid, p->parent->pid);
>  	if ((relative = eldest_child(p)))
> 

Yup.  But the whole thing's dead anyway - we do not clear the kernel stack
when it is allocated hence the attempt to work out how much was used cannot
work.

That's what

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.66/2.5.66-mm3/broken-out/show_task-free-stack-fix.patch

is about, but it needs finishing off.

  reply	other threads:[~2003-04-04  6:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-04  6:38 Pete Zaitcev
2003-04-04  6:43 ` Andrew Morton [this message]
2003-04-04  6:48   ` Pete Zaitcev
2003-04-04  7:40     ` Andrew Morton

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=20030403224346.51d9680e.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zaitcev@redhat.com \
    /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®