]> git.ipfire.org Git - thirdparty/lxc.git/commit
fix the ns_cgroup vs clone_children
authorDaniel Lezcano <daniel.lezcano@free.fr>
Sun, 9 Jan 2011 22:53:19 +0000 (23:53 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Sun, 9 Jan 2011 22:53:19 +0000 (23:53 +0100)
commit5193cc3d9366791bc0de70274ca8ca3f111430b8
tree8f3c2ac2382ca546cd94e9d64b71b53de0952953
parent57f61aa7504fc965b0c3dca2e1553ad535eacfd8
fix the ns_cgroup vs clone_children

The following patch fixes the bug where the clone_children compatibility
flag is available with the ns_cgroup subsystem. The 2.6.37 kernel version
should be the only one which is concerned by this modification, please
refer to Documentation/feature-removal-schedule.txt and look for ns_cgroup.

The problem is coming from we check for clone_children and we set it
automatically and then we try to create a new cgroup. As the
ns_cgroup is present the cgroup already exists and we are not allowed
to attach our pid to a new cgroup. The next error will be when we try
to create a new container because we enabled the clone_children flag
and the ns_cgroup is present, it is not allowed by the kernel.

The patch fix this by checking the mount options.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/cgroup.c