From: Al Viro <viro@ZenIV.linux.org.uk>
To: Tejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>, shyju pv <shyju.pv@huawei.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
Sanil kumar <sanil.kumar@huawei.com>,
Masanari Iida <standby24x7@gmail.com>
Subject: Re: 3.5-rc3: BUG: Dentry still in use (1) [unmount of cgroup cgroup]
Date: Sat, 30 Jun 2012 09:34:21 +0100 [thread overview]
Message-ID: <20120630083421.GD14083@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CAOS58YNnU3J+c2ZQcRCesSoxn0dSJjDLBsZ2qzZ09X6N-ky0fQ@mail.gmail.com>
On Sat, Jun 30, 2012 at 12:04:36AM -0700, Tejun Heo wrote:
> Hello, Al.
>
> On Fri, Jun 29, 2012 at 11:47 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> > On Sat, Jun 30, 2012 at 02:13:02PM +0800, Li Zefan wrote:
> >> So it's bad to have dentry refcnts dangling after umount.
> >
> > No shit. ?Yes, it is bad. ?What on the Earth is cgroup code doing with
> > those? ?And what could it possibly want to do with dentry reference
> > after the filesystem has been shut down, assuming it could hold one
> > in the first place?
>
> cgroup interface code was copied from sysfs back when it was
> piggybacking internal data structures to dentries, so, unfortunately,
> sysfs is still using dentries to manage internal data structures and
> propagates internal refs to dentry refs. There seem to be several
> places where dentry ref is held w/o active super ref triggering BUG on
> umount. Longer term, it should be updated to share sysfs code, I
> guess.
Now that I've looked at that code again... What's the story with
simple_unlink(d->d_inode, d);
in cgroup_rm_file()? Wrong parent inode, at the very least...
While we are at it, what the hell is going on in
static void cgroup_clear_directory(struct dentry *dir)
{
struct cgroup *cgrp = __d_cgrp(dir);
while (!list_empty(&cgrp->files))
cgroup_rm_file(cgrp, NULL);
}
Are you fighting some kind of race against somebody adding stuff
there? Unless I'm seriously misreading cgroup_rm_file(), it'll
do all the work on the first call...
next prev parent reply other threads:[~2012-06-30 8:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-24 19:08 3.5-rc3: BUG: Dentry still in use (1) [unmount of cgroup cgroup] shyju pv
2012-06-26 23:00 ` Masanari Iida
2012-06-27 18:29 ` tj
2012-06-27 23:02 ` tj
2012-06-28 14:09 ` Masanari Iida
2012-06-28 6:07 ` Li Zefan
2012-06-28 6:07 ` Li Zefan
2012-06-28 18:07 ` tj
2012-06-29 2:20 ` Li Zefan
2012-06-29 16:58 ` tj
2012-06-29 18:07 ` Masanari Iida
2012-06-30 6:13 ` Li Zefan
2012-06-30 6:47 ` Al Viro
2012-06-30 7:04 ` Tejun Heo
2012-06-30 8:34 ` Al Viro [this message]
2012-07-03 17:10 ` Tejun Heo
2012-07-03 17:38 ` [PATCH] cgroup: cgroup_rm_files() was calling simple_unlink() with the wrong inode Tejun Heo
2012-07-04 5:40 ` Li Zefan
2012-07-09 17:11 ` Tejun Heo
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=20120630083421.GD14083@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=cgroups@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@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;
as well as URLs for NNTP newsgroup(s).