From: Al Viro <viro@ZenIV.linux.org.uk>
To: "'Tejun Heo'" <tj@kernel.org>
Cc: Shyju PV <shyju.pv@huawei.com>, "'Li Zefan'" <lizefan@huawei.com>,
"'Sanil kumar'" <sanil.kumar@huawei.com>,
"'Masanari Iida'" <standby24x7@gmail.com>,
"'LKML'" <linux-kernel@vger.kernel.org>,
"'Cgroups'" <cgroups@vger.kernel.org>,
levinsasha928@gmail.com, nagamani.mantha@huawei.com
Subject: Re: [PATCH 2/2] cgroup: fix cgroup hierarchy umount race
Date: Sat, 14 Jul 2012 13:08:52 +0100 [thread overview]
Message-ID: <20120714120852.GK22927@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20120707234659.GD16783@dhcp-172-17-108-109.mtv.corp.google.com>
On Sat, Jul 07, 2012 at 04:46:59PM -0700, 'Tejun Heo' wrote:
> Fix it by holding an extra superblock->s_active reference across
> dput() from css release, which is the dput() path added by 48ddbe1946
> and the only one which doesn't hold an extra s_active ref across the
> final cgroup dput().
> @@ -3883,8 +3883,12 @@ static void css_dput_fn(struct work_struct *work)
> {
> struct cgroup_subsys_state *css =
> container_of(work, struct cgroup_subsys_state, dput_work);
> + struct dentry *dentry = css->cgroup->dentry;
> + struct super_block *sb = dentry->d_sb;
>
> - dput(css->cgroup->dentry);
> + atomic_inc(&sb->s_active);
> + dput(dentry);
> + deactivate_super(sb);
> }
While we are at it, what guarantees that css->dput_work will complete before
css->cgroup or the object containing css get freed under us?
next prev parent reply other threads:[~2012-07-14 12:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-30 7:07 [PATCH] cgroup: fix dentry still in use bug when dropping css refs after umount Li Zefan
2012-06-30 14:34 ` Masanari Iida
2012-07-03 17:03 ` Tejun Heo
2012-07-03 22:52 ` Tejun Heo
2012-07-04 6:19 ` Li Zefan
2012-07-08 6:35 ` Tejun Heo
2012-07-10 2:11 ` Li Zefan
2012-07-16 16:45 ` Tejun Heo
[not found] ` <4ff55c60.27da440a.65ec.ffff83dfSMTPIN_ADDED@mx.google.com>
2012-07-07 23:46 ` [PATCH 1/2] Revert "cgroup: superblock can't be released with active dentries" 'Tejun Heo'
2012-07-07 23:46 ` [PATCH 2/2] cgroup: fix cgroup hierarchy umount race 'Tejun Heo'
2012-07-14 12:08 ` Al Viro [this message]
2012-07-16 16:44 ` 'Tejun Heo'
2012-07-04 5:56 ` [PATCH] cgroup: fix dentry still in use bug when dropping css refs after umount 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=20120714120852.GK22927@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=cgroups@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=nagamani.mantha@huawei.com \
--cc=sanil.kumar@huawei.com \
--cc=shyju.pv@huawei.com \
--cc=standby24x7@gmail.com \
--cc=tj@kernel.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
Powered by JetHome