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

From: Alexey Dobriyan
Date: Mon Apr 13 2009 - 03:11:20 EST


On Fri, Apr 10, 2009 at 05:56:36PM -0500, Serge E. Hallyn wrote:
> Quoting Alexey Dobriyan (adobriyan@xxxxxxxxx):
> > net_create() will be used by C/R code to create fresh netns on restart.
> >
> > Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
>
> Acked-by: Serge Hallyn <serue@xxxxxxxxxx>
>
> 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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/