diff options
author | Oleg Nesterov <oleg@redhat.com> | 2023-09-09 18:45:37 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-10-04 10:41:57 -0700 |
commit | e5ecf29c507830f192d3eb255662ad9ba219c442 (patch) | |
tree | f5b677554be5c5fc55acad7c72741ccaa0af6b77 | |
parent | 7904e53ed5a20fc678c01d5d1b07ec486425bb6a (diff) |
signal: complete_signal: use __for_each_thread()
do/while_each_thread should be avoided when possible.
Link: https://lkml.kernel.org/r/20230909164537.GA11633@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | kernel/signal.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index fc276fc07d87..ccfc3ded5672 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1058,12 +1058,11 @@ static void complete_signal(int sig, struct task_struct *p, enum pid_type type) signal->flags = SIGNAL_GROUP_EXIT; signal->group_exit_code = sig; signal->group_stop_count = 0; - t = p; - do { + __for_each_thread(signal, t) { task_clear_jobctl_pending(t, JOBCTL_PENDING_MASK); sigaddset(&t->pending.signal, SIGKILL); signal_wake_up(t, 1); - } while_each_thread(p, t); + } return; } } |