[PATCH 10/11] signal: Short circuit deliver coredump signals
From: Eric W. Biederman
Date: Fri Jun 26 2026 - 13:00:50 EST
The coredump rendevous start is the same as the process killing that
complete_signal performs. get_signal now gets the siginfo and the
signal number when a signal is short circuit delivered.
Start short circuit deliverying coredump signals as there is nothing
remaining that prevents their short circuit delivery.
This means that processes that coredump will now exit faster and
fatal_signal_pending will return true until the coredump starts.
Signed-off-by: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
---
kernel/signal.c | 29 +++++++++++++----------------
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index ce3a99573aa9..0b602dfb0b78 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1032,24 +1032,21 @@ static void complete_signal(int sig, struct task_struct *p, enum pid_type type)
(sig == SIGKILL || !p->ptrace)) {
/*
* This signal will be fatal to the whole group.
+ *
+ * Start a group exit and wake everybody up.
+ * This way we don't have other threads
+ * running and doing things after a slower
+ * thread has the fatal signal pending.
*/
- if (!sig_kernel_coredump(sig)) {
- /*
- * Start a group exit and wake everybody up.
- * This way we don't have other threads
- * running and doing things after a slower
- * thread has the fatal signal pending.
- */
- signal->flags = SIGNAL_GROUP_EXIT | SIGNAL_EXIT_DEQUEUE;
- signal->group_exit_code = sig;
- signal->group_stop_count = 0;
- __for_each_thread(signal, t) {
- task_clear_jobctl_pending(t, JOBCTL_PENDING_MASK);
- sigaddset(&t->pending.signal, SIGKILL);
- signal_wake_up(t, 1);
- }
- return;
+ signal->flags = SIGNAL_GROUP_EXIT | SIGNAL_EXIT_DEQUEUE;
+ signal->group_exit_code = sig;
+ signal->group_stop_count = 0;
+ __for_each_thread(signal, t) {
+ task_clear_jobctl_pending(t, JOBCTL_PENDING_MASK);
+ sigaddset(&t->pending.signal, SIGKILL);
+ signal_wake_up(t, 1);
}
+ return;
}
/*
--
2.41.0