On Sat, Nov 24, 2018 at 02:18:24PM +0000, Parav Pandit wrote: > > > static struct class ib_class = { > > > - .name = "infiniband", > > > - .dev_release = ib_device_release, > > > - .dev_uevent = ib_device_uevent, > > > + .name = "infiniband", > > > + .dev_release = ib_device_release, > > > + .dev_uevent = ib_device_uevent, > > > + .ns_type = &net_ns_type_operations, > > > + .namespace = net_namespace, > > > }; > > > > and lets not reformat code just to add horizonal whitespace please. > > > I see. 4 out of the 5 fields of structure follows right alignment, but keep old one as is? > But ok. Don't do vertical alignment then only 1 out of 5 is wrong. > > > +fs_initcall(ib_core_init); > > > > Really? So very strange. > > > Yes. when module is compile as in-built to kernel, init sequence needs first initialize the net's init function first. > Otherwise ib_core_init gets called and accesses uninitialized net_ns_operations. > This is similar to 80211 net/wireless/core.c And subsyste_late_initcall() is not OK? Jason