[Devel] Re: [PATCH 07/30] netns: extract net_create()

Alexey Dobriyan adobriyan at gmail.com
Mon Apr 13 00:11:11 PDT 2009


On Fri, Apr 10, 2009 at 05:56:36PM -0500, Serge E. Hallyn wrote:
> Quoting Alexey Dobriyan (adobriyan at gmail.com):
> > net_create() will be used by C/R code to create fresh netns on restart.
> > 
> > Signed-off-by: Alexey Dobriyan <adobriyan at gmail.com>
> 
> Acked-by: Serge Hallyn <serue at us.ibm.com>
> 
> Although this ends up making a new assumption that setup_net(), and
> therefore the pernet_ops->init() functions, do not return error > 0.
> There's nothing actually stopping that (outside of code review, but
> there appears to be no comment anywhere saying that's uncooth).
> 
> If it returns > 0, then we return the ns as though it were valid, but
> don't add it to the list of namespaces...  Do we care?

I think, no.

Recalling all the code put under netns changes, ->init hooks were put
under 0/-E convention. For sure, my changes in netns xtables,
conntracking and xfrm were definitely under it.

> > -struct net *copy_net_ns(unsigned long flags, struct net *old_net)
> > +struct net *net_create(void)
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list