[lxc-devel] [lxc/master] cgroups: fix cgroup limit braino

brauner on Github lxc-bot at linuxcontainers.org
Wed Apr 15 21:16:50 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 455 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200415/a0af0e52/attachment.bin>
-------------- next part --------------
From 92afbe74c4829d8212a059e851d952a355c24396 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Wed, 15 Apr 2020 23:15:49 +0200
Subject: [PATCH] cgroups: fix cgroup limit braino

Fixes: https://discuss.linuxcontainers.org/t/memory-limits-no-longer-being-applied/7429/7
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 src/lxc/cgroups/cgfsng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
index cabc39fb34..37309c9ead 100644
--- a/src/lxc/cgroups/cgfsng.c
+++ b/src/lxc/cgroups/cgfsng.c
@@ -2848,7 +2848,7 @@ __cgfsng_ops static bool cgfsng_setup_limits_legacy(struct cgroup_ops *ops,
 	if (!ops->hierarchies)
 		return ret_set_errno(false, EINVAL);
 
-	if (!pure_unified_layout(ops))
+	if (pure_unified_layout(ops))
 		return log_warn_errno(true, EINVAL, "Ignoring legacy cgroup limits on pure cgroup2 system");
 
 	sorted_cgroup_settings = sort_cgroup_settings(cgroup_settings);


More information about the lxc-devel mailing list