lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <4FC2C440.8090104@huawei.com>
Date:	Mon, 28 May 2012 08:18:08 +0800
From:	Li Zefan <lizefan@...wei.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Sasha Levin <levinsasha928@...il.com>,
	containers@...ts.linux-foundation.org, cgroups@...r.kernel.org,
	linux-kernel@...r.kernel.org, fweisbec@...il.com, rni@...gle.com,
	ctalbott@...gle.com, Vivek Goyal <vgoyal@...hat.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Michal Hocko <mhocko@...e.cz>,
	Balbir Singh <bsingharora@...il.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [PATCH] cgroup: superblock can't be released with active dentries

2012/5/24 23:41, Tejun Heo wrote:

>>>From 88787c483106c5830a46d18deaffdc1e70929af7 Mon Sep 17 00:00:00 2001
> From: Tejun Heo <tj@...nel.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@...nel.org>
> Reported-by: Sasha Levin <levinsasha928@...il.com>
> Tested-by: Sasha Levin <levinsasha928@...il.com>
> LKML-Reference: <CA+1xoqe5hMuxzCRhMy7J0XchDk2ZnuxOHJKikROk1-ReAzcT6g@...l.gmail.com>


Acked-by: Li Zefan <lizefan@...wei.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ