Skip to content

Commit cbe9dac

Browse files
committed
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>
1 parent ff69927 commit cbe9dac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/exit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ do_group_exit(int exit_code)
905905
exit_code = sig->group_exit_code;
906906
else if (sig->group_exec_task)
907907
exit_code = 0;
908-
else if (!thread_group_empty(current)) {
908+
else {
909909
struct sighand_struct *const sighand = current->sighand;
910910

911911
spin_lock_irq(&sighand->siglock);

0 commit comments

Comments
 (0)