[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87iky5fu6y.fsf_-_@email.froward.int.ebiederm.org>
Date: Tue, 18 Jun 2024 23:11:17 -0500
From: "Eric W. Biederman" <ebiederm@...ssion.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Tejun Heo <tj@...nel.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH 13/17] signal: Stop skipping current in do_group_exit &
get_signal
Now that schedule_task_exit_locked uses JOBCTL_WILL_EXIT instead of
setting the per task SIGKILL pending bit, and JOBCTL_WILL_EXIT is
expected to be present on all tasks that are exiting, it makes no
sense to skip the current task. So call schedule_task_exit_locked on
all threads.
Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>
---
kernel/exit.c | 6 +-----
kernel/signal.c | 6 +-----
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/kernel/exit.c b/kernel/exit.c
index 564bf17f4589..471af82376e5 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1015,12 +1015,8 @@ do_group_exit(int exit_code)
sig->group_exit_code = exit_code;
sig->flags = SIGNAL_GROUP_EXIT;
sig->group_stop_count = 0;
- __for_each_thread(sig, t) {
- if (t == current)
- continue;
+ __for_each_thread(sig, t)
schedule_task_exit_locked(t);
- }
- current->jobctl |= JOBCTL_WILL_EXIT;
}
spin_unlock_irq(&sighand->siglock);
}
diff --git a/kernel/signal.c b/kernel/signal.c
index 2b0f6d8baebb..8ae6d6550e82 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2876,12 +2876,8 @@ bool get_signal(struct ksignal *ksig)
signal->group_exit_code = exit_code;
signal->flags = SIGNAL_GROUP_EXIT;
signal->group_stop_count = 0;
- __for_each_thread(signal, t) {
- if (t == current)
- continue;
+ __for_each_thread(signal, t)
schedule_task_exit_locked(t);
- }
- current->jobctl |= JOBCTL_WILL_EXIT;
}
fatal:
spin_unlock_irq(&sighand->siglock);
--
2.41.0
Powered by blists - more mailing lists