From: Tejun Heo <htejun@gmail.com>
To: Paul Menage <paul@paulmenage.org>
Cc: rjw@sisk.pl, lizf@cn.fujitsu.com,
linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org,
containers@lists.linux-foundation.org, fweisbec@gmail.com,
matthltc@us.ibm.com, akpm@linux-foundation.org,
Oleg Nesterov <oleg@redhat.com>, Paul Menage <menage@google.com>
Subject: Re: [PATCH 3/4] threadgroup: extend threadgroup_lock() to cover exit and exec
Date: Tue, 13 Sep 2011 16:54:44 +0900 [thread overview]
Message-ID: <20110913075444.GE11397@mtj.dyndns.org> (raw)
In-Reply-To: <CALdu-PBhhH0p5QfET4ZHbKVwfVFEME9v7kzUyQiPyykFscB2Ng@mail.gmail.com>
On Sun, Sep 11, 2011 at 09:04:55PM -0700, Paul Menage wrote:
> On Sun, Sep 4, 2011 at 11:01 AM, Tejun Heo <htejun@gmail.com> wrote:
> > From: Tejun Heo <tj@kernel.org>
> >
> > threadgroup_lock() protected only protected against new addition to
> > the threadgroup, which was inherently somewhat incomplete and
> > problematic for its only user cgroup. On-going migration could race
> > against exec and exit leading to interesting problems - the symmetry
> > between various attach methods, task exiting during method execution,
> > ->exit() racing against attach methods, migrating task switching basic
> > properties during exec and so on.
> >
> > This patch extends threadgroup_lock() such that it protects against
> > all three threadgroup altering operations - fork, exit and exec. For
> > exit, threadgroup_change_begin/end() calls are added to exit path.
> > For exec, threadgroup_[un]lock() are updated to also grab and release
> > cred_guard_mutex.
>
> Can you add a comment (either in the commit or in the code) about why
> the cred_guard_mutex change is necessary? Is it simply that exec takes
> cred_guard_mutex and hence this excludes exec, or is there something
> more subtle?
Will do so. It's just for the exclusion of cred_guard_mutex. Maybe
we better rename it to exec_mutex or something, I don't know.
Thanks.
--
tejun
next prev parent reply other threads:[~2011-09-13 7:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-04 18:01 [PATCHSET cgroup] extend threadgroup locking Tejun Heo
2011-09-04 18:01 ` [PATCH 1/4] cgroup: change locking order in attach_task_by_pid() Tejun Heo
2011-09-18 18:56 ` Oleg Nesterov
2011-10-10 17:34 ` Tejun Heo
2011-10-10 17:43 ` Tejun Heo
2011-09-04 18:01 ` [PATCH 2/4] threadgroup: rename signal->threadgroup_fork_lock to ->group_rwsem Tejun Heo
2011-09-04 18:01 ` [PATCH 3/4] threadgroup: extend threadgroup_lock() to cover exit and exec Tejun Heo
2011-09-12 4:04 ` Paul Menage
2011-09-13 7:54 ` Tejun Heo [this message]
2011-09-18 17:37 ` Oleg Nesterov
2011-09-18 18:46 ` Oleg Nesterov
2011-10-08 18:37 ` Ben Blum
2011-10-10 17:11 ` Tejun Heo
2011-10-12 17:51 ` Oleg Nesterov
2011-10-12 18:05 ` Ben Blum
2011-10-12 18:29 ` Oleg Nesterov
2011-10-12 18:44 ` Ben Blum
2011-10-12 19:07 ` Oleg Nesterov
2011-09-04 18:01 ` [PATCH 4/4] cgroup: always lock threadgroup during migration Tejun Heo
2011-09-18 17:41 ` Oleg Nesterov
2011-10-10 17:31 ` Tejun Heo
2011-09-05 4:05 ` [PATCHSET cgroup] extend threadgroup locking Rafael J. Wysocki
2011-09-05 8:43 ` Tejun Heo
2011-09-06 9:00 ` Li Zefan
2011-09-11 3:35 ` Tejun Heo
2011-09-14 18:33 ` Oleg Nesterov
2011-09-14 23:33 ` Tejun Heo
2011-09-12 4:11 ` Paul Menage
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=20110913075444.GE11397@mtj.dyndns.org \
--to=htejun@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=lizf@cn.fujitsu.com \
--cc=matthltc@us.ibm.com \
--cc=menage@google.com \
--cc=oleg@redhat.com \
--cc=paul@paulmenage.org \
--cc=rjw@sisk.pl \
/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
Powered by JetHome