From: Oleg Nesterov <oleg@redhat.com>
To: Roland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Stanislaw Gruszka <sgruszka@redhat.com>,
Vitaly Mayatskikh <vmayatsk@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] ptrace-wait_task_zombie-do-not-account-traced-sub-threads-fix
Date: Thu, 18 Jun 2009 20:47:08 +0200 [thread overview]
Message-ID: <20090618184708.GA15790@redhat.com> (raw)
In-Reply-To: <20090616004510.2885FFC3D3@magilla.sf.frob.com>
On 06/15, Roland McGrath wrote:
>
> ACK, but I think it warrants a comment explaining that task_detached() here
> always means "ptrace'd but not reparented".
Please see below. Not sure my comment is more clear...
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
--- PTRACE/kernel/exit.c~1_WAIT_REPARENTED_COMMENT 2009-06-18 20:39:07.000000000 +0200
+++ PTRACE/kernel/exit.c 2009-06-18 20:42:05.000000000 +0200
@@ -1188,7 +1188,10 @@ static int wait_task_zombie(struct wait_
}
traced = ptrace_reparented(p);
-
+ /*
+ * It can be ptraced but not reparented, check
+ * !task_detached() to filter out sub-threads.
+ */
if (likely(!traced) && likely(!task_detached(p))) {
struct signal_struct *psig;
struct signal_struct *sig;
prev parent reply other threads:[~2009-06-18 18:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 21:26 [PATCH 1/2] ptrace: wait_task_zombie: do not account traced sub-threads Oleg Nesterov
2009-06-16 0:45 ` Roland McGrath
2009-06-17 19:48 ` [rfc] ptrace: wait_task_zombie: fix the racy EXIT_ZOMBIE setting Oleg Nesterov
2009-06-18 18:47 ` Oleg Nesterov [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=20090618184708.GA15790@redhat.com \
--to=oleg@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
--cc=sgruszka@redhat.com \
--cc=vmayatsk@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