diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-22 17:16:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-22 17:16:42 -0400 |
commit | cf508b1211dbe576778ff445ea1b4b0bcfa5c4ea (patch) | |
tree | 4774838c2db17db71662a625fea25def8823341a /drivers/net/macvlan.c | |
parent | d29f749e252bcdbfe7a75a58f0ee92da16f127c0 (diff) |
netdev: Handle ->addr_list_lock just like ->_xmit_lock for lockdep.
The new address list lock needs to handle the same device layering
issues that the _xmit_lock one does.
This integrates work done by Patrick McHardy.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r-- | drivers/net/macvlan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index efbc15567dd3..42394505bb50 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
@@ -276,6 +276,7 @@ static int macvlan_change_mtu(struct net_device *dev, int new_mtu) | |||
276 | * separate class since they always nest. | 276 | * separate class since they always nest. |
277 | */ | 277 | */ |
278 | static struct lock_class_key macvlan_netdev_xmit_lock_key; | 278 | static struct lock_class_key macvlan_netdev_xmit_lock_key; |
279 | static struct lock_class_key macvlan_netdev_addr_lock_key; | ||
279 | 280 | ||
280 | #define MACVLAN_FEATURES \ | 281 | #define MACVLAN_FEATURES \ |
281 | (NETIF_F_SG | NETIF_F_ALL_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \ | 282 | (NETIF_F_SG | NETIF_F_ALL_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \ |
@@ -295,6 +296,8 @@ static void macvlan_set_lockdep_class_one(struct net_device *dev, | |||
295 | 296 | ||
296 | static void macvlan_set_lockdep_class(struct net_device *dev) | 297 | static void macvlan_set_lockdep_class(struct net_device *dev) |
297 | { | 298 | { |
299 | lockdep_set_class(&dev->addr_list_lock, | ||
300 | &macvlan_netdev_addr_lock_key); | ||
298 | netdev_for_each_tx_queue(dev, macvlan_set_lockdep_class_one, NULL); | 301 | netdev_for_each_tx_queue(dev, macvlan_set_lockdep_class_one, NULL); |
299 | } | 302 | } |
300 | 303 | ||