diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2016-08-12 10:10:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-13 18:15:54 -0400 |
commit | 952fcfd08c8109951622579d0ae7b9cd6cafd688 (patch) | |
tree | 16e787138d3da28899e3a0028962928c79a4af07 /include/linux/netdevice.h | |
parent | e20038724552cd05e351cd7d7526d646953d26b7 (diff) |
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>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 076df5360ba5..3a788bf0affd 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -3891,8 +3891,7 @@ void netdev_default_l2upper_neigh_destroy(struct net_device *dev, | |||
3891 | extern u8 netdev_rss_key[NETDEV_RSS_KEY_LEN] __read_mostly; | 3891 | extern u8 netdev_rss_key[NETDEV_RSS_KEY_LEN] __read_mostly; |
3892 | void netdev_rss_key_fill(void *buffer, size_t len); | 3892 | void netdev_rss_key_fill(void *buffer, size_t len); |
3893 | 3893 | ||
3894 | int dev_get_nest_level(struct net_device *dev, | 3894 | int dev_get_nest_level(struct net_device *dev); |
3895 | bool (*type_check)(const struct net_device *dev)); | ||
3896 | int skb_checksum_help(struct sk_buff *skb); | 3895 | int skb_checksum_help(struct sk_buff *skb); |
3897 | struct sk_buff *__skb_gso_segment(struct sk_buff *skb, | 3896 | struct sk_buff *__skb_gso_segment(struct sk_buff *skb, |
3898 | netdev_features_t features, bool tx_path); | 3897 | netdev_features_t features, bool tx_path); |