]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
exit: kill unnecessary thread_group_leader() checks in exit_notify() and do_notify_pa...
authorOleg Nesterov <oleg@redhat.com>
Sun, 22 Feb 2026 15:23:37 +0000 (16:23 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 28 Mar 2026 04:19:34 +0000 (21:19 -0700)
commit617ab884b893032765fbc0ebf656fa3015016648
tree50af5c7b7dd451e210a553772ff79ec2eae4fe3a
parent225ba47fb9ec17440781563ea729f3fe67f1b5b8
exit: kill unnecessary thread_group_leader() checks in exit_notify() and do_notify_parent()

thread_group_empty(tsk) is only possible if tsk is a group leader, and
thread_group_empty() already does the thread_group_leader() check.

So it makes no sense to check "thread_group_leader() &&
thread_group_empty()"; thread_group_empty() alone is enough.

Link: https://lkml.kernel.org/r/aZsfeegKZPZZszJh@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Kees Cook <kees@kernel.org>
Cc; Deepanshu Kartikey <kartikey406@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/exit.c
kernel/signal.c