lkml.org 
[lkml]   [2004]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: oops in proc_pid_stat() on task->real_parent?
On Tue, Dec 07, 2004 at 10:07:55PM -0800, Chris Wright wrote:
> * Andrew Morton (akpm@osdl.org) wrote:
> > yup, we fixed that one.
>
> I thought the same thing, but this oops is from proc_pid_stat, not
> proc_pid_status. The code is now in do_task_stat(), and the oops is
> within the orignal tasklist lock (instead of dropping and reaquiring the
> lock). So, might be fixed, but if so, I think for a different reason.
>
> thanks,
> -chris

hmmm they were two places that I had changed to reflect the parent.

This should fix it?

Signed-off-by: Dinakar Guniguntala <dino@in.ibm.com>


diff -Naurp linux-2.6.10-rc2.orig/fs/proc/array.c linux-2.6.10-rc2/fs/proc/array.c
--- linux-2.6.10-rc2.orig/fs/proc/array.c 2004-11-15 06:57:52.000000000 +0530
+++ linux-2.6.10-rc2/fs/proc/array.c 2004-12-08 12:54:40.000000000 +0530
@@ -370,7 +370,7 @@ static int do_task_stat(struct task_stru
stime += task->signal->stime;
}
}
- ppid = task->pid ? task->group_leader->real_parent->tgid : 0;
+ ppid = pid_alive(task) ? task->group_leader->real_parent->tgid : 0;
read_unlock(&tasklist_lock);

if (!whole || num_threads<2)
\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.085 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site