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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 03 Dec 2008 08:48:35 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	sudhir kumar <imsudhirkumar@...il.com>
CC:	linux-kernel@...r.kernel.org, vatsa@...ux.vnet.ibm.com,
	bharata@...ux.vnet.ibm.com, dhaval@...ux.vnet.ibm.com,
	balbir@...ux.vnet.ibm.com, skumar@...ux.vnet.ibm.com,
	Peter <a.p.zijlstra@...llo.nl>, Paul Menage <menage@...gle.com>,
	mingo@...e.hu
Subject: Re: BUG: CGROUPS [2.6.28-rc6] Task migration does not clean reference
 to group

sudhir kumar wrote:
> On Tue, Dec 2, 2008 at 6:37 PM, Li Zefan <lizf@...fujitsu.com> wrote:
>> sudhir kumar wrote:
>>> Hi,
>>> I see an interesting bug in the cgroups. I found that cat /proc/cgroups
>>> does not decrease the num_cgroups field when a group is deleted. It looks
>>> to me that somewhere we miss to delete the reference, which leads to a failure
>>> to unmount the cgroups filesystem.
>> Ah, it's not a bug. :)
> Oh Sorry!
>>> The steps to produce the bug are:
>>>
>>> mkdir /cpu
>>> mount -t cgroup -ocpu cgroup /cpu
>>> cd cpu
>>> mkdir group1;
>>> cd group1;
>>> /./while &              # an infinite loop
>> Seems whenever we create a background job, we'll have a pin to the directory where
>> the job is created. So though rmdir() removed the directory, the dentry's refcnt
> Thanks for that.
> Should not rmdir fail in such a case ? Otherwise there is no other way
> for the user than to kill his task and unmount the cgroup fs, in case
> he needs to do so. Or shall we change the pin to point to the target
> directory? No idea if I am demanding too much ;(
> 

You don't have to remove all the sub-dirs before umount cgroup fs. But if a process
has some pins to a directory, it's sure you can't umount the underlying fs, this
has nothing to do with cgroup.

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