[Devel] [PATCH VZ10 v4 02/44] fixup! ve/net: thread owning ve through copy_net_ns
Vladimir Riabchun
vladimir.riabchun at virtuozzo.com
Wed Jun 3 00:10:20 MSK 2026
https://virtuozzo.atlassian.net/browse/VSTOR-130116
Feature: !CONFIG_VE build
Signed-off-by: Vladimir Riabchun <vladimir.riabchun at virtuozzo.com>
---
net/core/net_namespace.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 3738e5274cd9..a4d91cccaaa4 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -501,7 +501,9 @@ struct net *copy_net_ns(unsigned long flags,
struct user_namespace *user_ns, struct net *old_net,
struct ve_struct *new_ve)
{
+#ifdef CONFIG_VE
struct ve_struct *ve;
+#endif
struct ucounts *ucounts;
struct net *net;
int rv;
@@ -509,6 +511,7 @@ struct net *copy_net_ns(unsigned long flags,
if (!(flags & CLONE_NEWNET))
return get_net(old_net);
+#ifdef CONFIG_VE
/*
* The ve that should own the new netns. When called from
* copy_namespaces()/unshare_nsproxy_namespaces() with a freshly
@@ -516,6 +519,7 @@ struct net *copy_net_ns(unsigned long flags,
* caller because get_exec_env() still resolves to the parent ve.
*/
ve = new_ve ?: get_exec_env();
+#endif
ucounts = inc_net_namespaces(user_ns);
if (!ucounts)
--
2.47.1
More information about the Devel
mailing list