Re: [PATCH 2/6] netns: Teach network device kobjects whichnamespace they are in.

From: Serge E. Hallyn
Date: Wed May 05 2010 - 18:02:04 EST


Quoting Eric W. Biederman (ebiederm@xxxxxxxxxxxx):
> "Serge E. Hallyn" <serue@xxxxxxxxxx> writes:
>
> > Quoting Eric W. Biederman (ebiederm@xxxxxxxxxxxx):
> >> diff --git a/net/Kconfig b/net/Kconfig
> >> index 041c35e..265e33b 100644
> >> --- a/net/Kconfig
> >> +++ b/net/Kconfig
> >> @@ -45,6 +45,14 @@ config COMPAT_NETLINK_MESSAGES
> >>
> >> menu "Networking options"
> >>
> >> +config NET_NS
> >> + bool "Network namespace support"
> >> + default n
> >> + depends on EXPERIMENTAL && NAMESPACES
> >> + help
> >> + Allow user space to create what appear to be multiple instances
> >> + of the network stack.
> >> +
> >
> > Hi Eric,
> >
> > I'm confused - NET_NS is defined in init/Kconfig right now. Is the tree
> > you're working from very different from mine, or is this the unfortunate
> > rekult of the patches sitting so long?
>
> Old patches, nothing that complains when you make a mistake like this,
> and apparently I have a blind spot in my personal code review.

haha, we all know about that.

> At one point it was not possible to enable the network namespace until
> the sysfs stuff was enabled, but things have been going on long enough
> that we worked around that restriction.

Yeah, I remember that, and leaving this wouldn't break anything.

> >> int netdev_kobject_init(void)
> >> {
> >> + kobj_ns_type_register(&net_ns_type_operations);
> >> +#ifdef CONFIG_SYSFS
> >> + register_pernet_subsys(&sysfs_net_ops);
> >> +#endif
> >> return class_register(&net_class);
> >
> > I think the kobj_ns_type_register() needs to be under
> > ifdef CONFIG_SYSFS as well, bc net_ns_type_operations is defined
> > under ifdef CONFIG_SYSFS.
>
> kobj_ns_type_register should not be under CONFIG_SYSFS. Which means
> that kobj_ns_type_operations needs not to be under CONFIG_SYSFS as
> well. That you for spotting that bug.

np - outside of that,

Acked-by: Serge E. Hallyn <serue@xxxxxxxxxx>

I saw no problems with the other patches, just don't feel qualified
to give an ack.

thanks,
-serge
--
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/