[Devel] [PATCH rh7] Revert "ve/netns: wait for sub net namespaces to exit on ve cleanup"

Cyrill Gorcunov gorcunov at virtuozzo.com
Sun Jun 21 10:13:11 PDT 2015


On Sun, Jun 21, 2015 at 07:48:38PM +0300, Vladimir Davydov wrote:
> This reverts commit da13b22809fc80f5493441b141f4979dedc74fb2.
> 
> In RH6 we have a rather sophisticated VE-vs-netns destruction design: on
> fini_ve_netns we setup sysfs_completion, then put ve_netns, which is
> supposed to complete the completion, and then wait for the completion.
> This is needed, because net ns has a reference to ve and therefore it
> must die before ve. With sub net namespaces introduced this design gets
> even trickier: now we want all sub net namespaces to die before ve. To
> achieve that, we made each sub net ns take a reference to the ve_netns -
> this is what the patch I'm reverting did.
> 
> In RH7 we don't need this crap, because each net ns takes a reference to
> the owner ve and therefore ve cannot pass away before ve_netns or any
> sub net ns.
> 
> Moreover, the original patch contains a bug: it makes net_free, which is
> called from cleanup_net -> net_drop_ns, dereference net->owner_ve, the
> reference to which is dropped earlier in cleanup_net:

What a mess :/ Actually I've been hitting this bug as well,
but I though it's due to my own changes in tty layer so
didn't imaine about this place. Thanks!

Reviewed-by: Cyrill Gorcunov <gorcunov at openvz.org>



More information about the Devel mailing list