When net-exit routine executes we zap ve::ve_netns member but we should not nillify ve0::init_net, it's permanent one.
https://jira.sw.ru/browse/PSBM-33480 p.s.: When net unsharing happens on ve0 we do set net->owner_ve to ve0, thus on exit we occasionally rip it off causing any futher attempts to call unshare on ve0 to fail. Signed-off-by: Cyrill Gorcunov <gorcu...@odin.com> CC: Andrew Vagin <ava...@odin.com> --- net/core/net_namespace.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) Index: linux-pcs7.git/net/core/net_namespace.c =================================================================== --- linux-pcs7.git.orig/net/core/net_namespace.c +++ linux-pcs7.git/net/core/net_namespace.c @@ -314,7 +314,11 @@ static void cleanup_net(struct work_stru ops_free_list(ops, &net_exit_list); list_for_each_entry(net, &net_kill_list, cleanup_list) { - net->owner_ve->ve_netns = NULL; + /* + * Don't ever nil'ify init_net! + */ + if (net->owner_ve->ve_netns != get_ve0()->ve_netns) + net->owner_ve->ve_netns = NULL; put_ve(net->owner_ve); } _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel