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
..
2016-07-27 14:03:52 -07:00
2016-08-01 18:36:01 -04:00
2016-08-01 18:36:01 -04:00
2016-07-30 21:01:36 -07:00
2016-07-28 15:45:17 -07:00
2016-08-01 18:36:01 -04:00
2016-08-01 16:49:13 -04:00
2016-07-30 21:01:36 -07:00
2016-08-01 18:36:01 -04:00
2016-08-01 07:25:10 -04:00
2016-07-30 21:01:36 -07:00
2016-07-30 21:01:36 -07:00
2016-08-02 17:05:11 -04:00
2016-08-01 18:36:01 -04:00
2016-07-31 21:36:58 -04:00
2016-08-02 17:05:11 -04:00
2016-07-20 23:39:36 -07:00
2016-07-28 17:38:16 -07:00
2016-07-30 21:01:36 -07:00
2016-07-31 21:36:58 -04:00
2016-07-26 18:27:20 -07:00
2016-08-01 18:36:01 -04:00
2016-08-01 18:36:01 -04:00
2016-08-01 18:36:01 -04:00
2016-08-01 18:37:45 -04:00
2016-08-01 18:36:01 -04:00
2016-08-02 19:35:40 -04:00
2016-07-27 11:35:37 -07:00
2016-07-27 15:18:53 -07:00