From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.cz>, Sameer Nanda <snanda@chromium.org>,
Sergey Dyasly <dserrg@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] signals: change do_signal_stop/do_sigaction to use while_each_thread()
Date: Fri, 22 Nov 2013 20:18:22 +0100 [thread overview]
Message-ID: <20131122191822.GA16943@redhat.com> (raw)
In-Reply-To: <20131122191803.GA16919@redhat.com>
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>
---
kernel/signal.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index ded28b9..086071d 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2047,8 +2047,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,
@@ -3125,8 +3125,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);
}
}
--
1.5.5.1
next prev parent reply other threads:[~2013-11-22 19:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-22 19:18 [PATCH 0/3] more next_thread/while_each_thread changes Oleg Nesterov
2013-11-22 19:18 ` [PATCH 1/3] proc: change do_task_stat() to use while_each_thread() Oleg Nesterov
2013-11-22 20:15 ` Sameer Nanda
2013-11-22 19:18 ` [PATCH 2/3] k_getrusage() can " Oleg Nesterov
2013-11-22 20:16 ` Sameer Nanda
2013-11-22 19:18 ` Oleg Nesterov [this message]
2013-11-22 20:17 ` [PATCH 3/3] signals: change do_signal_stop/do_sigaction to " Sameer Nanda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131122191822.GA16943@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dserrg@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.cz \
--cc=snanda@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox