On Jul 18, 2012, at 10:55 AM, Eric Dumazet wrote: > On Wed, 2012-07-18 at 17:36 +0000, Rustad, Mark D wrote: >> >> The following change simply statically initializes init_net.dev_base_head. I copied and pasted it into the email, so this rendering may not work, but I can send it if this approach looks reasonable. I have verified that it resolves the issue above. >> >> diff --git a/net/core/dev.c b/net/core/dev.c >> index 0f28a9e..db1ba61 100644 >> --- a/net/core/dev.c >> +++ b/net/core/dev.c >> @@ -6283,8 +6283,6 @@ static struct hlist_head *netdev_create_hash(void) >> /* Initialize per network namespace state */ >> static int __net_init netdev_init(struct net *net) >> { >> - INIT_LIST_HEAD(&net->dev_base_head); >> - > > if (net != &init_net) > INIT_LIST_HEAD(&net->dev_base_head); Ooooh. Good catch. >> net->dev_name_head = netdev_create_hash(); >> if (net->dev_name_head == NULL) >> goto err_name; >> diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c >> index dddbacb..42f1e1c 100644 >> --- a/net/core/net_namespace.c >> +++ b/net/core/net_namespace.c >> @@ -27,7 +27,9 @@ static DEFINE_MUTEX(net_mutex); >> LIST_HEAD(net_namespace_list); >> EXPORT_SYMBOL_GPL(net_namespace_list); >> >> -struct net init_net; >> +struct net init_net = { >> + .dev_base_head = LIST_HEAD_INIT(init_net.dev_base_head), >> +}; >> EXPORT_SYMBOL(init_net); >> >> #define INITIAL_NET_GEN_PTRS 13 /* +1 for len +2 for rcu_head */ If this looks like a good change, I can send the patch. Is there any concern about init_net going from bss to data? -- Mark Rustad, LAN Access Division, Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html