From: Oleg Nesterov Date: Wed, 17 Oct 2007 06:26:59 +0000 (-0700) Subject: wait_task_zombie: don't fight with non-existing race with a dying ptracee X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=442a10cf9e1c350b4de4dd6f22c72618a0b13d7f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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, 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);