* Patch for show_task
@ 2003-04-04 6:38 Pete Zaitcev
2003-04-04 6:43 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Pete Zaitcev @ 2003-04-04 6:38 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
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)))
-- Pete
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Patch for show_task
2003-04-04 6:38 Patch for show_task Pete Zaitcev
@ 2003-04-04 6:43 ` Andrew Morton
2003-04-04 6:48 ` Pete Zaitcev
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2003-04-04 6:43 UTC (permalink / raw)
To: Pete Zaitcev; +Cc: linux-kernel
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-04-04 7:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-04 6:38 Patch for show_task Pete Zaitcev
2003-04-04 6:43 ` Andrew Morton
2003-04-04 6:48 ` Pete Zaitcev
2003-04-04 7:40 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox