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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 4 Jul 2012 13:56:24 +0800
From:	Li Zefan <lizefan@...wei.com>
To:	Tejun Heo <tj@...nel.org>
CC:	shyju pv <shyju.pv@...wei.com>,
	Sanil kumar <sanil.kumar@...wei.com>,
	Masanari Iida <standby24x7@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Cgroups <cgroups@...r.kernel.org>, <viro@...iv.linux.org.uk>
Subject: Re: [PATCH] cgroup: fix dentry still in use bug when dropping css
 refs after umount

>> @@ -78,8 +79,8 @@ struct cgroup_subsys_state {

>>  	/* ID for this css, if possible */
>>  	struct css_id __rcu *id;
>>  
>> -	/* Used to put @cgroup->dentry on the last css_put() */
>> -	struct work_struct dput_work;
>> +	/* Used to put @cgroup->css_refs on the last css_put() */
>> +	struct work_struct put_work;
>>  };
>>  
>>  /* bits in struct cgroup_subsys_state flags field */
>> @@ -170,6 +171,9 @@ struct cgroup {
>>  	 */
>>  	atomic_t count;
>>  
>> +	/* We won't destroy the cgroup when there are css refs */
>> +	struct kref css_refs;
>> +
>>  	/*
>>  	 * We link our 'sibling' struct into our parent's 'children'.
>>  	 * Our children link their 'sibling' into our 'children'.
> 
> Hmm... adding another layer of refcnting.  Now we end up with three
> layers of refcnting - the active usage via cgroup->count, cgroup
> lifetime via cgroup->dentry->d_count and this extended lifecycle
> refcnt.  In addition, we now have to deal with partially destroyed
> cgroups - e.g. running cgroup_path() will oops on lingering cgroups.
> Hating this tangling of dentries and cgroups more and more.  :(
> 


yeah, the fix you sent looks better.

--
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