From: Dinakar Guniguntala <dino@in.ibm.com>
To: Chris Wright <chrisw@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>, Dave Hansen <dave@sr71.net>,
linux-kernel@vger.kernel.org
Subject: Re: oops in proc_pid_stat() on task->real_parent?
Date: Wed, 8 Dec 2004 13:16:05 +0530 [thread overview]
Message-ID: <20041208074605.GA4495@in.ibm.com> (raw)
In-Reply-To: <20041207220753.E469@build.pdx.osdl.net>
[-- Attachment #1: Type: text/plain, Size: 590 bytes --]
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>
[-- Attachment #2: ps_stat-2.patch --]
[-- Type: text/plain, Size: 536 bytes --]
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)
prev parent reply other threads:[~2004-12-08 7:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-08 0:55 oops in proc_pid_stat() on task->real_parent? Dave Hansen
2004-12-08 6:00 ` Andrew Morton
2004-12-08 6:07 ` Chris Wright
2004-12-08 6:18 ` Andrew Morton
2004-12-08 17:02 ` Chris Wright
2004-12-08 7:46 ` Dinakar Guniguntala [this message]
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=20041208074605.GA4495@in.ibm.com \
--to=dino@in.ibm.com \
--cc=akpm@osdl.org \
--cc=chrisw@osdl.org \
--cc=dave@sr71.net \
--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