[Devel] [PATCH RHEL7 COMMIT] ve/prctl_set_mm: allow to change mm content in ve

Konstantin Khorenko khorenko at virtuozzo.com
Fri May 13 09:32:39 PDT 2016


The commit is pushed to "branch-rh7-3.10.0-327.10.1.vz7.12.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.10.1.vz7.12.19
------>
commit bf2ffd7881db8053d8b8be3ad5223b03e6085beb
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date:   Fri May 13 20:32:39 2016 +0400

    ve/prctl_set_mm: allow to change mm content in ve
    
    This is required to be able to change /proc/pid/exe of a process, running on
    NFS.
    SPFS manager, which does this change, is a child of criu process, which is
    being started in container from the early beginning.
    
    https://jira.sw.ru/browse/PSBM-26967
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky 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 da5d22a..5746c61 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -2337,7 +2337,7 @@ static int prctl_set_mm(int opt, unsigned long addr,
 		return prctl_set_mm_map(opt, (const void __user *)addr, arg4);
 #endif
 
-	if (!capable(CAP_SYS_RESOURCE))
+	if (!ve_capable(CAP_SYS_RESOURCE))
 		return -EPERM;
 
 	if (opt == PR_SET_MM_EXE_FILE)


More information about the Devel mailing list