[Devel] [PATCH rh7] kernel: allow to increase rlimit from inside container

Vladimir Davydov vdavydov at virtuozzo.com
Mon Jan 25 05:07:16 PST 2016


This works on PCS6, so we should allow it on Vz7 either.

https://jira.sw.ru/browse/PSBM-43410

Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
---
 kernel/sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sys.c b/kernel/sys.c
index c8ca093fed43..1f88b2b72dc3 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1774,7 +1774,7 @@ int do_prlimit(struct task_struct *tsk, unsigned int resource,
 		/* Keep the capable check against init_user_ns until
 		   cgroups can contain all limits */
 		if (new_rlim->rlim_max > rlim->rlim_max &&
-				!capable(CAP_SYS_RESOURCE))
+				!ve_capable(CAP_SYS_RESOURCE))
 			retval = -EPERM;
 		if (!retval)
 			retval = security_task_setrlimit(tsk->group_leader,
-- 
2.1.4



More information about the Devel mailing list