From: Jan Safranek Date: Thu, 2 Dec 2010 14:00:40 +0000 (+0100) Subject: There is a bug which causes the initialised configuration will X-Git-Tag: v0.37~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=240b5ed20f10170df3548b9a444096d631019c44;p=thirdparty%2Flibcgroup.git There is a bug which causes the initialised configuration will 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 Acked-by: Jan Safranek Signed-off-by: Jan Safranek --- diff --git a/src/api.c b/src/api.c index 7e2903dc..859190a9 100644 --- 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]);