Hi Pravin, In "Re: [ovs-dev] "brctl show" doesn't list attached interfaces", Pravin Shelar <pshe...@nicira.com> wrote: > On Thu, Sep 27, 2012 at 8:18 PM, Tadaaki Nagao <na...@stratosphere.co.jp> > wrote: > > Hi, > > > > In "Re: [ovs-dev] "brctl show" doesn't list attached interfaces", > > Jesse Gross <je...@nicira.com> wrote: > >> I think it's the opposite problem - that OVS ports aren't appearing in > >> brctl output. There's a bug with namespaces on certain kernels when > >> populating the sysfs entries that Pravin ran into so we don't do that > >> on the theory that missing entries are better than crashing. > > > > In datapath/dp_sysfs_dp.c:ovs_dp_sysfs_add_dp() there's a similar NULL > > check with the same "could panic" comment, which makes sense to me because > > sysfs_create_group() is actually called after the check. > > > > --------8<--------cut here--------8<-------- > > #ifdef CONFIG_NET_NS > > /* Due to bug in 2.6.32 kernel, sysfs_create_group() could panic > > * in other namespace than init_net. Following check is to avoid > > it. */ > > if (!kobj->sd) > > return -ENOENT; > > #endif > > /* Create /sys/class/net/<devname>/bridge directory. */ > > err = sysfs_create_group(kobj, &bridge_group); > > --------8<--------cut here--------8<-------- > > > > OTOH, after the check in datapath/dp_sysfs_if.c:ovs_dp_sysfs_add_if() > > there's no call to sysfs_create_group() as I mentioned in the first mail. > > And that made me uncertain what the check is actually meant for... > > > right, there is no call to sysfs_crate_grp() when adding a interface, > need to fix comment. > But it does panic on 2.6.32 while creating sysfs hierarchy in > sysfs_create_dir(). I am not sure which kernel does fixes this issue.
Thank you for your comments! I've finally managed to create a test environment on LXC + CentOS 6.3 (kernel 2.6.32-279.9.1.el6.x86_64) and could reproduce a panic when commenting out the NULL check in ovs_dp_sysfs_add_if(). > I will see if we could have better check here. If there's something I can do here, please let me know. > Thanks, > Pravin. Thanks, Tadaaki Nagao <na...@stratosphere.co.jp> Stratosphere Inc. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev