[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090618184708.GA15790@redhat.com>
Date: Thu, 18 Jun 2009 20:47:08 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Roland McGrath <roland@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Stanislaw Gruszka <sgruszka@...hat.com>,
Vitaly Mayatskikh <vmayatsk@...hat.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH]
ptrace-wait_task_zombie-do-not-account-traced-sub-threads-fix
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@...hat.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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists