[Devel] [libvzctl PATCH 2/2] env_create: created root run path in VE#0 context

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Fri Jul 28 11:43:25 MSK 2017


Currently it's created as a part of first CT pid file. And this file is
created in VE#X context. Which in turn leads to "leaked" dentry.
Well, it's not leaked, but rather anoying, because holds VE#X slabs and
visible in /sys like this after CT stop:

/sys/kernel/slab/:atA-0000192/cgroup/dentry(5:102)

This patch fixes it by explicitly created runt root dentry in VE#0

Found in scope of https://jira.sw.ru/browse/PSBM-65033

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 lib/env_nsops.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/env_nsops.c b/lib/env_nsops.c
index 4ecd46e..d7ae0bf 100644
--- a/lib/env_nsops.c
+++ b/lib/env_nsops.c
@@ -739,6 +739,10 @@ static int do_env_create(struct vzctl_env_handle *h, struct start_param *param)
 	act.sa_flags = SA_NOCLDSTOP;
 	sigaction(SIGPIPE, &act, NULL);
 
+	ret = create_ve_run_dir();
+	if (ret)
+		return ret;
+
 	ret = create_cgroup(h, flags);
 	if (ret)
 		return ret;



More information about the Devel mailing list