Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d015baeb authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds
Browse files

[PATCH] futex_find_get_task(): remove an obscure EXIT_ZOMBIE check



futex_find_get_task:

	if (p->state == EXIT_ZOMBIE || p->exit_state == EXIT_ZOMBIE)
		return NULL;

I can't understand this.  First, p->state can't be EXIT_ZOMBIE.  The
->exit_state check looks strange too.  Sub-threads or tasks whose ->parent
ignores SIGCHLD go directly to EXIT_DEAD state (I am ignoring a ptrace
case).  Why EXIT_DEAD tasks should be ok?  Yes, EXIT_ZOMBIE is more
important (a task may stay zombie for a long time), but this doesn't mean
we should explicitely ignore other EXIT_XXX states.

Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Acked-by: default avatarIngo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 533475d3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -397,7 +397,7 @@ static struct task_struct * futex_find_get_task(pid_t pid)
		p = NULL;
		p = NULL;
		goto out_unlock;
		goto out_unlock;
	}
	}
	if (p->state == EXIT_ZOMBIE || p->exit_state == EXIT_ZOMBIE) {
	if (p->exit_state != 0) {
		p = NULL;
		p = NULL;
		goto out_unlock;
		goto out_unlock;
	}
	}