diff options
| author | Oleg Nesterov <oleg@redhat.com> | 2014-01-23 15:55:56 -0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-05-02 18:15:43 +0200 |
| commit | 3091e5084c72a58d8164559c590a25475b2b234a (patch) | |
| tree | 9ec78f76cdf18e5592c9729a00191f39aa40ba95 /kernel/signal.c | |
| parent | 1fb5eb3fc2935a90931843b53df5953b0e9c3136 (diff) | |
kernel/signal.c: change do_signal_stop/do_sigaction to use while_each_thread()
Change do_signal_stop() and do_sigaction() to avoid next_thread() and use
while_each_thread() instead.
Change-Id: I6a34f65244048e113815d6e5afaaed2911a8d93d
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Kees Cook <keescook@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/signal.c')
| -rw-r--r-- | kernel/signal.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index a7eae356b..27c8070c0 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -2033,8 +2033,8 @@ static bool do_signal_stop(int signr) if (task_set_jobctl_pending(current, signr | gstop)) sig->group_stop_count++; - for (t = next_thread(current); t != current; - t = next_thread(t)) { + t = current; + while_each_thread(current, t) { /* * Setting state to TASK_STOPPED for a group * stop is always done with the siglock held, @@ -3108,8 +3108,7 @@ int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) rm_from_queue_full(&mask, &t->signal->shared_pending); do { rm_from_queue_full(&mask, &t->pending); - t = next_thread(t); - } while (t != current); + } while_each_thread(current, t); } } |
