aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2007-10-17 02:26:59 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:42:51 -0400
commit442a10cf9e1c350b4de4dd6f22c72618a0b13d7f (patch)
tree13ab9fc1bd97be616511425d422e0c9188fbf5f3 /kernel
parentebca4cda1133775111e8b09f7124a7e5e391926d (diff)
wait_task_zombie: don't fight with non-existing race with a dying ptracee
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> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 28144b94e55c..b27a3dcde671 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1189,13 +1189,6 @@ static int wait_task_zombie(struct task_struct *p, int noreap,
1189 BUG_ON(state != EXIT_DEAD); 1189 BUG_ON(state != EXIT_DEAD);
1190 return 0; 1190 return 0;
1191 } 1191 }
1192 if (unlikely(p->exit_signal == -1 && p->ptrace == 0)) {
1193 /*
1194 * This can only happen in a race with a ptraced thread
1195 * dying on another processor.
1196 */
1197 return 0;
1198 }
1199 1192
1200 /* traced means p->ptrace, but not vice versa */ 1193 /* traced means p->ptrace, but not vice versa */
1201 traced = (p->real_parent != p->parent); 1194 traced = (p->real_parent != p->parent);