From: Li Zefan <lizefan@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: Sasha Levin <levinsasha928@gmail.com>,
containers@lists.linux-foundation.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, fweisbec@gmail.com, rni@google.com,
ctalbott@google.com, Vivek Goyal <vgoyal@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.cz>,
Balbir Singh <bsingharora@gmail.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [PATCH] cgroup: superblock can't be released with active dentries
Date: Mon, 28 May 2012 08:18:08 +0800 [thread overview]
Message-ID: <4FC2C440.8090104@huawei.com> (raw)
In-Reply-To: <20120524154139.GA27983@google.com>
2012/5/24 23:41, Tejun Heo wrote:
>>From 88787c483106c5830a46d18deaffdc1e70929af7 Mon Sep 17 00:00:00 2001
> From: Tejun Heo <tj@kernel.org>
> Date: Thu, 24 May 2012 08:24:39 -0700
>
> 48ddbe1946 "cgroup: make css->refcnt clearing on cgroup removal
> optional" allowed a css to linger after the associated cgroup is
> removed. As a css holds a reference on the cgroup's dentry, it means
> that cgroup dentries may linger for a while.
>
> cgroup_create() does grab an active reference on the superblock to
> prevent it from going away while there are !root cgroups; however, the
> reference is put from cgroup_diput() which is invoked on cgroup
> removal, so cgroup dentries which are removed but persisting due to
> lingering csses already have released their superblock active refs
> allowing superblock to be killed while those dentries are around.
>
> Given the right condition, this makes cgroup_kill_sb() call
> kill_litter_super() with dentries with non-zero d_count leading to
> BUG() in shrink_dcache_for_umount_subtree().
>
> Fix it by adding cgroup_dops->d_release() operation and moving
> deactivate_super() to it. cgroup_diput() now marks dentry->d_fsdata
> with itself if superblock should be deactivated and cgroup_d_release()
> deactivates the superblock on dentry release.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Reported-by: Sasha Levin <levinsasha928@gmail.com>
> Tested-by: Sasha Levin <levinsasha928@gmail.com>
> LKML-Reference: <CA+1xoqe5hMuxzCRhMy7J0XchDk2ZnuxOHJKikROk1-ReAzcT6g@mail.gmail.com>
Acked-by: Li Zefan <lizefan@huawei.com>
next prev parent reply other threads:[~2012-05-28 0:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 22:34 [PATCH 1/2] cgroup: use negative bias on css->refcnt to block css_tryget() Tejun Heo
2012-03-30 22:36 ` [PATCH 2/2] cgroup: make css->refcnt clearing on cgroup removal optional Tejun Heo
2012-03-31 21:28 ` Hiroyuki Kamezawa
2012-04-01 2:00 ` Li Zefan
2012-04-01 18:54 ` Tejun Heo
2012-05-16 22:33 ` Sasha Levin
2012-05-18 17:55 ` Tejun Heo
2012-05-18 18:28 ` Sasha Levin
2012-05-23 22:22 ` Tejun Heo
2012-05-24 13:21 ` Sasha Levin
2012-05-24 15:41 ` [PATCH] cgroup: superblock can't be released with active dentries Tejun Heo
2012-05-28 0:18 ` Li Zefan [this message]
2012-04-01 19:48 ` [PATCH 2/2] cgroup: make css->refcnt clearing on cgroup removal optional Vivek Goyal
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=4FC2C440.8090104@huawei.com \
--to=lizefan@huawei.com \
--cc=bsingharora@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=containers@lists.linux-foundation.org \
--cc=ctalbott@google.com \
--cc=fweisbec@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.cz \
--cc=rni@google.com \
--cc=tj@kernel.org \
--cc=vgoyal@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
Powered by JetHome