[Devel] [PATCH RHEL7 COMMIT] ub: sync memcg before setting limit via sys_setublimit
Konstantin Khorenko
khorenko at virtuozzo.com
Mon May 25 03:27:58 PDT 2015
The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.5
------>
commit c613b7dff258b96fbc014613dc4a0a95eae18a66
Author: Vladimir Davydov <vdavydov at parallels.com>
Date: Mon May 25 14:27:58 2015 +0400
ub: sync memcg before setting limit via sys_setublimit
Otherwise, sys_setublimit can reset limits for resources accounted by
memcg.
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
kernel/bc/sys.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/bc/sys.c b/kernel/bc/sys.c
index 096aa97..3c0b9ab 100644
--- a/kernel/bc/sys.c
+++ b/kernel/bc/sys.c
@@ -93,6 +93,8 @@ long do_setublimit(uid_t uid, unsigned long resource,
goto out;
}
+ ub_sync_memcg(ub);
+
spin_lock_irqsave(&ub->ub_lock, flags);
ub->ub_parms[resource].barrier = new_limits[0];
ub->ub_parms[resource].limit = new_limits[1];
More information about the Devel
mailing list