From: Tejun Heo <tj@kernel.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] has_stopped_jobs: s/task_is_stopped/SIGNAL_STOP_STOPPED/
Date: Wed, 13 Jul 2011 12:17:01 +0200 [thread overview]
Message-ID: <20110713101701.GH2872@htj.dyndns.org> (raw)
In-Reply-To: <20110707193354.GA27600@redhat.com>
On Thu, Jul 07, 2011 at 09:33:54PM +0200, Oleg Nesterov wrote:
> has_stopped_jobs() naively checks task_is_stopped(group_leader). This
> was always wrong even without ptrace, group_leader can be dead. And
> given that ptrace can change the state to TRACED this is wrong even
> in the single-threaded case.
>
> Change the code to check SIGNAL_STOP_STOPPED and simplify the code,
> retval + break/continue doesn't make this trivial code more readable.
>
> We could probably add the usual "|| signal->group_stop_count" check
> but I don't think this makes sense, the task can start the group-stop
> right after the check anyway.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
As for "|| signal->group_stop_count", it might be better to use the
same wrapper here too for consistency if we add one.
Thank you.
--
tejun
prev parent reply other threads:[~2011-07-13 10:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-07 19:33 Oleg Nesterov
2011-07-13 10:17 ` Tejun Heo [this message]
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=20110713101701.GH2872@htj.dyndns.org \
--to=tj@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
/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
all inboxes | Powered by JetHome®