[RH7] ve: don't hide cgroup mount root from pseudosuper

Submitted by Pavel Tikhomirov on March 26, 2019, 10:15 a.m.

Details

Message ID 20190326101534.22891-1-ptikhomirov@virtuozzo.com
State New
Series "ve: don't hide cgroup mount root from pseudosuper"
Headers show

Commit Message

Pavel Tikhomirov March 26, 2019, 10:15 a.m.
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);
 }
 
 /*