]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
wait_task_zombie: don't fight with non-existing race with a dying ptracee
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 17 Oct 2007 06:26:59 +0000 (23:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:51 +0000 (08:42 -0700)
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>
kernel/exit.c

index 28144b94e55cc56e2bf557050cd86ad3b0bf8433..b27a3dcde6713e5716924e567d4c6e472aaa7419 100644 (file)
@@ -1189,13 +1189,6 @@ static int wait_task_zombie(struct task_struct *p, int noreap,
                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);