[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5319270D.4030602@huawei.com>
Date: Fri, 7 Mar 2014 09:55:25 +0800
From: Ding Tianhong <dingtianhong@...wei.com>
To: David Miller <davem@...emloft.net>
CC: <ben@...adent.org.uk>, <john.r.fastabend@...el.com>,
<kaber@...sh.net>, <netdev@...r.kernel.org>, <f.fainelli@...il.com>
Subject: Re: [PATCH net-next] vlan: Fix lockdep warning when vlan dev handle
notification
On 2014/3/7 3:51, David Miller wrote:
> From: Ding Tianhong <dingtianhong@...wei.com>
> Date: Thu, 6 Mar 2014 22:13:33 +0800
>
>> When I open the LOCKDEP config and run these steps:
>>
>> modprobe 8021q
>> vconfig add eth2 20
>> vconfig add eth2.20 30
>> ifconfig eth2 xx.xx.xx.xx
>>
>> then the Call Trace happened:
> ...
>> The reason is that all of the vlan dev have the same class key for dev_lock_list,
>> if we up or down the real dev, the notification will change the state for every
>> vlan dev in the vlan group, then the vlan dev will hold netif_addr_lock and the
>> real dev also hold its own netif_addr_lock together, so the warning happened.
>>
>> The best way to fix the problem is add a new class key for the vlan dev if its
>> real dev is a vlan dev too.
>>
>> Signed-off-by: Ding Tianhong <dingtianhong@...wei.com>
>
> So what happens when one does:
>
> vconfig add eth2 20
> vconfig add eth2.20 30
> vconfig add eth2.30 40
> ifconfig eth2 xx.xx.xx.xx
>
>
the old vlan list:
eth2---------------------->eth2.20-------------------->eth2.20.30 (xxx_addr_lock_key)
(xxx_addr_lock_key)|
---------->eth2.20.50 (xxx_addr_lock_key)
after this patch:
eth2---------------------->eth2.20-------------------->eth2.20.30 (xxx_addr_lock_subkey)
(xxx_addr_lock_key)|
---------->eth2.20.50 (xxx_addr_lock_subkey)
The eth2.20 will only sync mc ddress with eth2.20.30 or eth2.20.50, and
the eth2.20.30 would never sync mc with eth2.20.50, so the xxx_addr_lock_subkey
will not meet each other.
But I think if I vconfig add eth2.20.30 50, the warning would happen again, but till now
I could not find any scene that use 3 vlan id on a virtual device, so I think it is not a
problem.
--
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