From: Christian Brauner Date: Thu, 20 Jun 2019 17:37:09 +0000 (+0200) Subject: cgfsng: write cpuset.mems of correct ancestor X-Git-Tag: lxc-3.2.0~23^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f68ea354f462d5425bf2237ae2b6011071b4859a;p=thirdparty%2Flxc.git cgfsng: write cpuset.mems of correct ancestor Reported-by: Free Ekanayaka Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 9c05fbbe3..62b7a87b0 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -400,6 +400,7 @@ static bool cg_legacy_filter_and_set_cpus(char *path, bool am_initialized) oldv = *lastslash; *lastslash = '\0'; fpath = must_make_path(path, "cpuset.cpus", NULL); + *lastslash = oldv; posscpus = read_file(fpath); if (!posscpus) { SYSERROR("Failed to read file \"%s\"", fpath); @@ -504,7 +505,6 @@ static bool cg_legacy_filter_and_set_cpus(char *path, bool am_initialized) copy_parent: if (!am_initialized) { - *lastslash = oldv; fpath = must_make_path(path, "cpuset.cpus", NULL); ret = lxc_write_to_file(fpath, cpulist, strlen(cpulist), false, 0666);