From: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v2] cgroup: protect modifications to cgroup->idr with cgroup_mutex
Date: Wed, 12 Feb 2014 15:02:10 +0800 [thread overview]
Message-ID: <52FB1C72.60605@huawei.com> (raw)
In-Reply-To: <20140212063713.GA7984-9pTldWuhBndy/B6EtB590w@public.gmane.org>
On 2014/2/12 14:37, Tejun Heo wrote:
> Hello, Li.
>
> On Wed, Feb 12, 2014 at 02:28:53PM +0800, Li Zefan wrote:
>> v2:
>> - Don't call deactivate_super() inside cgroup_mutex, as cgroup_kill_sb()
>> will be called if sb refcnt reaches 0. I don't think this can happen,
>> as cgroup_create() is called through vfs, so vfs should guarantee the
>> superblock won't disappear. Still better not depend on it even my guess
>> is probably correct.
>
> If the deadlock can't actually happen, I don't really care either way
> as the code goes away after kernfs conversion anyway. I've already
> applied v1, so if you think this change is important, can you send an
> incremental patch?
>
I'm fine to stick with V1.
I'm pretty confident it's safe, as we can increment sb refcnt without
any checking or locking (even cgroup_mutex as the comment says) in
cgroup_create().
WARNING: multiple messages have this Message-ID (diff)
From: Li Zefan <lizefan@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: Michal Hocko <mhocko@suse.cz>,
LKML <linux-kernel@vger.kernel.org>,
Cgroups <cgroups@vger.kernel.org>
Subject: Re: [PATCH v2] cgroup: protect modifications to cgroup->idr with cgroup_mutex
Date: Wed, 12 Feb 2014 15:02:10 +0800 [thread overview]
Message-ID: <52FB1C72.60605@huawei.com> (raw)
In-Reply-To: <20140212063713.GA7984@mtj.dyndns.org>
On 2014/2/12 14:37, Tejun Heo wrote:
> Hello, Li.
>
> On Wed, Feb 12, 2014 at 02:28:53PM +0800, Li Zefan wrote:
>> v2:
>> - Don't call deactivate_super() inside cgroup_mutex, as cgroup_kill_sb()
>> will be called if sb refcnt reaches 0. I don't think this can happen,
>> as cgroup_create() is called through vfs, so vfs should guarantee the
>> superblock won't disappear. Still better not depend on it even my guess
>> is probably correct.
>
> If the deadlock can't actually happen, I don't really care either way
> as the code goes away after kernfs conversion anyway. I've already
> applied v1, so if you think this change is important, can you send an
> incremental patch?
>
I'm fine to stick with V1.
I'm pretty confident it's safe, as we can increment sb refcnt without
any checking or locking (even cgroup_mutex as the comment says) in
cgroup_create().
next prev parent reply other threads:[~2014-02-12 7:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 6:28 [PATCH v2] cgroup: protect modifications to cgroup->idr with cgroup_mutex Li Zefan
2014-02-12 6:28 ` Li Zefan
[not found] ` <52FB14A5.9030307-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-02-12 6:37 ` Tejun Heo
2014-02-12 6:37 ` Tejun Heo
[not found] ` <20140212063713.GA7984-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2014-02-12 7:02 ` Li Zefan [this message]
2014-02-12 7:02 ` Li Zefan
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=52FB1C72.60605@huawei.com \
--to=lizefan-hv44wf8li93qt0dzr+alfa@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mhocko-AlSwsSmVLrQ@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.