projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7904e53
)
signal: complete_signal: use __for_each_thread()
author
Oleg Nesterov
<oleg@redhat.com>
Sat, 9 Sep 2023 16:45:37 +0000
(18:45 +0200)
committer
Andrew Morton
<akpm@linux-foundation.org>
Wed, 4 Oct 2023 17:41:57 +0000
(10:41 -0700)
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>
kernel/signal.c
patch
|
blob
|
history
diff --git
a/kernel/signal.c
b/kernel/signal.c
index fc276fc07d87790223f94061cb2f9978eb0ab3dd..ccfc3ded5672165894fee2d17be43230a4b78636 100644
(file)
--- 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;
}
}