]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: check for correct error in __cg_unified_attach() from cgroup_attach() 3651/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 4 Feb 2021 19:27:40 +0000 (20:27 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 4 Feb 2021 19:27:40 +0000 (20:27 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 65aa9701680b116712bcc0749a59c78abf344c3f..ee116cb66015b2ae62b981ef08880e4c1f52bfb8 100644 (file)
@@ -2415,7 +2415,7 @@ static int __cg_unified_attach(const struct hierarchy *h,
        ret = cgroup_attach(conf, name, lxcpath, pid);
        if (ret == 0)
                return log_trace(0, "Attached to unified cgroup via command handler");
-       if (ret != -EBADF)
+       if (ret != -ENOCGROUP2)
                return log_error_errno(ret, errno, "Failed to attach to unified cgroup");
 
        /* Fall back to retrieving the path for the unified cgroup. */