diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2022-06-21 19:39:51 +0200 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2022-07-20 17:21:52 +0200 |
commit | cbe9dac379047730e39c7e570eddd27124b0d2dc (patch) | |
tree | 60eec1ecd31be1381b3332ee82936719a28ccf19 /kernel/exit.c | |
parent | Linux 5.19-rc7 (diff) | |
download | linux-cbe9dac379047730e39c7e570eddd27124b0d2dc.tar.xz linux-cbe9dac379047730e39c7e570eddd27124b0d2dc.zip |
signal: Ensure SIGNAL_GROUP_EXIT gets set in do_group_exit
The function do_group_exit has an optimization that avoids taking
siglock and doing the work to find other threads in the signal group
and shutting them down.
It is very desirable for SIGNAL_GROUP_EXIT to always been set whenever
it is decided for the process to exit. That ensures only a single
place needs to be tested, and a single bit of state needs to be looked
at. This makes the optimization in do_group_exit counter productive.
Make the code and maintenance simpler by removing this unnecessary
option.
Link: https://lkml.kernel.org/r/87letod4v3.fsf_-_@email.froward.int.ebiederm.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 64c938ce36fe..a3929e5e6d61 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -905,7 +905,7 @@ do_group_exit(int exit_code) exit_code = sig->group_exit_code; else if (sig->group_exec_task) exit_code = 0; - else if (!thread_group_empty(current)) { + else { struct sighand_struct *const sighand = current->sighand; spin_lock_irq(&sighand->siglock); |