[Devel] [PATCH RHEL7 COMMIT] ve/kernel: allow to increase rlimit	from inside container
    Konstantin Khorenko 
    khorenko at virtuozzo.com
       
    Mon Jan 25 07:33:23 PST 2016
    
    
  
The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.9.28
------>
commit 2d5d8eaeeed7d9febb116a8a367c5a72795cd4f4
Author: Vladimir Davydov <vdavydov at virtuozzo.com>
Date:   Mon Jan 25 19:33:23 2016 +0400
    ve/kernel: allow to increase rlimit from inside container
    
    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 c8ca093..1f88b2b 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,
    
    
More information about the Devel
mailing list