[RHEL7,COMMIT] ve: don't hide cgroup mount root from pseudosuper

Submitted by Konstantin Khorenko on March 28, 2019, 8:37 a.m.

Details

Message ID 201903280837.x2S8biYV009941@finist-ce7.sw.ru
State New
Series "ve: don't hide cgroup mount root from pseudosuper"
Headers show

Commit Message

Konstantin Khorenko March 28, 2019, 8:37 a.m.
The commit is pushed to "branch-rh7-3.10.0-957.10.1.vz7.85.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.10.1.vz7.85.4
------>
commit 85f7a3da6552b7974a8755fe083689fd3c19634d
Author: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Date:   Thu Mar 28 11:37:44 2019 +0300

    ve: don't hide cgroup mount root from pseudosuper
    
    Will need it to check mouninfo persists at the late restore,
    where the root task is inside ve.
    
    https://jira.sw.ru/browse/PSBM-86686
    Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 kernel/cgroup.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index d35e2ac150a3..9ca8af9f73d9 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1862,7 +1862,9 @@  EXPORT_SYMBOL_GPL(cgroup_path);
 
 int cgroup_path_ve(const struct cgroup *cgrp, char *buf, int buflen)
 {
-	return __cgroup_path(cgrp, buf, buflen, !ve_is_super(get_exec_env()));
+	struct ve_struct *ve = get_exec_env();
+
+	return __cgroup_path(cgrp, buf, buflen, !ve_is_super(ve) && !ve->is_pseudosuper);
 }
 
 /*