[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <FEB6B45E-1CCF-4CBC-AEB7-21D2088E175C@intel.com>
Date: Wed, 18 Jul 2012 18:31:31 +0000
From: "Rustad, Mark D" <mark.d.rustad@...el.com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: Neil Horman <nhorman@...driver.com>,
"Fastabend, John R" <john.r.fastabend@...el.com>,
"<h@...reliant.think-freely.org>" <h@...reliant.think-freely.org>,
David Miller <davem@...emloft.net>,
"<netdev@...r.kernel.org>" <netdev@...r.kernel.org>,
"<linux-wireless@...r.kernel.org>" <linux-wireless@...r.kernel.org>,
"<netfilter-devel@...r.kernel.org>" <netfilter-devel@...r.kernel.org>
Subject: Re: That's pretty much it for 3.5.0
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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists