]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
There is a bug which causes the initialised configuration will
authorJan Safranek <jsafrane@redhat.com>
Thu, 2 Dec 2010 14:00:40 +0000 (15:00 +0100)
committerJan Safranek <jsafrane@redhat.com>
Thu, 2 Dec 2010 14:00:40 +0000 (15:00 +0100)
be bogus or does not work at all and majority of tools does not work well.
The situation happens when multiple mount points are mounted for one hierarchy and the hierarchy
have multiple controllers:

example:

# lssubsys
cpu,cpuacct /mnt/cgroups/cpu
cpuacct /cgroup/cpu
memory /cgroup/memory

# cat /proc/mounts | grep cgroup
cpu /mnt/cgroups/cpu cgroup rw,relatime,cpuacct,cpu 0 0
cgroup /cgroup/cpu cgroup rw,relatime,cpuacct,cpu 0 0
cgroup /cgroup/memory cgroup rw,relatime,memory 0 0

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Acked-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
src/api.c

index 7e2903dc4b45899eafae971c15351845677c241a..859190a97b670dd515b6e3116aa6299d033203d4 100644 (file)
--- a/src/api.c
+++ b/src/api.c
@@ -826,7 +826,7 @@ int cgroup_init(void)
                        if (duplicate) {
                                cgroup_dbg("controller %s is already mounted on %s\n",
                                        mntopt, cg_mount_table[j].path);
-                               continue;
+                               break;
                        }
 
                        strcpy(cg_mount_table[found_mnt].name, controllers[i]);