* [PATCH] wait_task_zombie: don't fight with non-existing race with a dying ptracee
@ 2007-08-17 15:37 Oleg Nesterov
2007-08-17 20:04 ` Roland McGrath
0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2007-08-17 15:37 UTC (permalink / raw)
To: Andrew Morton; +Cc: Roland McGrath, linux-kernel
(textually depends on wait_task_zombie-remove-unneeded-child-signal-check.patch)
The "p->exit_signal == -1 && p->ptrace == 0" check and the comment are bogus.
We already did exactly the same check in eligible_child(), we did not drop
tasklist_lock since then, and both variables need write_lock(tasklist) to be
changed.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- t/kernel/exit.c~1_WTZ_NORACE 2007-08-17 17:31:59.000000000 +0400
+++ t/kernel/exit.c 2007-08-17 18:56:31.000000000 +0400
@@ -1210,13 +1210,6 @@ static int wait_task_zombie(struct task_
BUG_ON(state != EXIT_DEAD);
return 0;
}
- if (unlikely(p->exit_signal == -1 && p->ptrace == 0)) {
- /*
- * This can only happen in a race with a ptraced thread
- * dying on another processor.
- */
- return 0;
- }
/* traced means p->ptrace, but not vice versa */
traced = (p->real_parent != p->parent);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] wait_task_zombie: don't fight with non-existing race with a dying ptracee
2007-08-17 15:37 [PATCH] wait_task_zombie: don't fight with non-existing race with a dying ptracee Oleg Nesterov
@ 2007-08-17 20:04 ` Roland McGrath
0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2007-08-17 20:04 UTC (permalink / raw)
To: Oleg Nesterov; +Cc: Andrew Morton, linux-kernel
> (textually depends on wait_task_zombie-remove-unneeded-child-signal-check.patch)
>
> The "p->exit_signal == -1 && p->ptrace == 0" check and the comment are bogus.
> We already did exactly the same check in eligible_child(), we did not drop
> tasklist_lock since then, and both variables need write_lock(tasklist) to be
> changed.
I think this is correct. IIRC, when the check was added, ->ptrace could be
cleared some other way.
Thanks,
Roland
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-17 20:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-17 15:37 [PATCH] wait_task_zombie: don't fight with non-existing race with a dying ptracee Oleg Nesterov
2007-08-17 20:04 ` Roland McGrath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®