diff options
author | Oleg Nesterov <oleg@redhat.com> | 2014-01-23 18:55:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 19:37:02 -0500 |
commit | 8d38f203b46c36626285400b9466b08abecaaa80 (patch) | |
tree | 262015ec19a4d39c29d9b21e0e14cbe2863ffb26 /kernel | |
parent | 2e1f38358246b8f8e5871026b21d374e9bb1a163 (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.
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')
-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 940b30ee9a30..52f881db1ca0 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -2047,8 +2047,8 @@ static bool do_signal_stop(int signr) | |||
2047 | if (task_set_jobctl_pending(current, signr | gstop)) | 2047 | if (task_set_jobctl_pending(current, signr | gstop)) |
2048 | sig->group_stop_count++; | 2048 | sig->group_stop_count++; |
2049 | 2049 | ||
2050 | for (t = next_thread(current); t != current; | 2050 | t = current; |
2051 | t = next_thread(t)) { | 2051 | while_each_thread(current, t) { |
2052 | /* | 2052 | /* |
2053 | * Setting state to TASK_STOPPED for a group | 2053 | * Setting state to TASK_STOPPED for a group |
2054 | * stop is always done with the siglock held, | 2054 | * stop is always done with the siglock held, |
@@ -3125,8 +3125,7 @@ int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) | |||
3125 | rm_from_queue_full(&mask, &t->signal->shared_pending); | 3125 | rm_from_queue_full(&mask, &t->signal->shared_pending); |
3126 | do { | 3126 | do { |
3127 | rm_from_queue_full(&mask, &t->pending); | 3127 | rm_from_queue_full(&mask, &t->pending); |
3128 | t = next_thread(t); | 3128 | } while_each_thread(current, t); |
3129 | } while (t != current); | ||
3130 | } | 3129 | } |
3131 | } | 3130 | } |
3132 | 3131 | ||