1
0
Fork 0
alistair23-linux/net/8021q
Sabrina Dubroca 952fcfd08c net: remove type_check from dev_get_nest_level()
The idea for type_check in dev_get_nest_level() was to count the number
of nested devices of the same type (currently, only macvlan or vlan
devices).
This prevented the false positive lockdep warning on configurations such
as:

eth0 <--- macvlan0 <--- vlan0 <--- macvlan1

However, this doesn't prevent a warning on a configuration such as:

eth0 <--- macvlan0 <--- vlan0
eth1 <--- vlan1 <--- macvlan1

In this case, all the locks end up with a nesting subclass of 1, so
lockdep thinks that there is still a deadlock:

- in the first case we have (macvlan_netdev_addr_lock_key, 1) and then
  take (vlan_netdev_xmit_lock_key, 1)
- in the second case, we have (vlan_netdev_xmit_lock_key, 1) and then
  take (macvlan_netdev_addr_lock_key, 1)

By removing the linktype check in dev_get_nest_level() and always
incrementing the nesting depth, lockdep considers this configuration
valid.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13 15:15:54 -07:00
..
Kconfig 8021q: update description 2014-01-21 17:01:25 -08:00
Makefile net/8021q: Implement Multiple VLAN Registration Protocol (MVRP) 2013-02-10 20:37:22 -05:00
vlan.c net: remove type_check from dev_get_nest_level() 2016-08-13 15:15:54 -07:00
vlan.h vlan: Propagate MAC address to VLANs 2016-05-31 11:56:48 -07:00
vlan_core.c vlan: Do not put vlan headers back on bridge and macvlan ports 2015-11-17 14:38:35 -05:00
vlan_dev.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-07-24 00:53:32 -04:00
vlan_gvrp.c net: vlan: prepare for 802.1ad support 2013-04-19 14:45:27 -04:00
vlan_mvrp.c net: vlan: prepare for 802.1ad support 2013-04-19 14:45:27 -04:00
vlan_netlink.c vlan: use a valid default mtu value for vlan over macsec 2016-07-16 20:15:02 -07:00
vlanproc.c vlan: change return type of vlan_proc_rem_dev 2016-02-17 22:06:28 -05:00
vlanproc.h vlan: change return type of vlan_proc_rem_dev 2016-02-17 22:06:28 -05:00