[Devel] [PATCH RHEL10 COMMIT] fixup! ve/net: thread owning ve through copy_net_ns
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Jun 5 21:31:56 MSK 2026
The commit is pushed to "branch-rh10-6.12.0-55.52.1.5.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-55.52.1.5.29.vz10
------>
commit df299a14ea7978914ea81e5985864ae62d600a5f
Author: Vladimir Riabchun <vladimir.riabchun at virtuozzo.com>
Date: Tue Jun 2 21:10:20 2026 +0000
fixup! ve/net: thread owning ve through copy_net_ns
https://virtuozzo.atlassian.net/browse/VSTOR-130116
Feature: !CONFIG_VE build
Signed-off-by: Vladimir Riabchun <vladimir.riabchun at virtuozzo.com>
Reviewed-by: Vasileios Almpanis <vasileios.almpanis 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 3738e5274cd9a..a4d91cccaaa49 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)
More information about the Devel
mailing list