Commit 90f92b68 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Christian Brauner

pidfd: kill the no longer needed do_notify_pidfd() in de_thread()

Now that __change_pid() does wake_up_all(&pid->wait_pidfd) we can kill
do_notify_pidfd(leader) in de_thread(), it calls release_task(leader)
right after that and this implies detach_pid(leader, PIDTYPE_PID).
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20240202131248.GA26022@redhat.comSigned-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 43f0df54
...@@ -1143,11 +1143,6 @@ static int de_thread(struct task_struct *tsk) ...@@ -1143,11 +1143,6 @@ static int de_thread(struct task_struct *tsk)
BUG_ON(leader->exit_state != EXIT_ZOMBIE); BUG_ON(leader->exit_state != EXIT_ZOMBIE);
leader->exit_state = EXIT_DEAD; leader->exit_state = EXIT_DEAD;
/*
* leader and tsk exhanged their pids, the old pid dies,
* wake up the PIDFD_THREAD waiters.
*/
do_notify_pidfd(leader);
/* /*
* We are going to release_task()->ptrace_unlink() silently, * We are going to release_task()->ptrace_unlink() silently,
* the tracer can sleep in do_wait(). EXIT_DEAD guarantees * the tracer can sleep in do_wait(). EXIT_DEAD guarantees
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment