aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-22 17:16:42 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-22 17:16:42 -0400
commitcf508b1211dbe576778ff445ea1b4b0bcfa5c4ea (patch)
tree4774838c2db17db71662a625fea25def8823341a /net/8021q/vlan_dev.c
parentd29f749e252bcdbfe7a75a58f0ee92da16f127c0 (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 'net/8021q/vlan_dev.c')
-rw-r--r--net/8021q/vlan_dev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index f42bc2b26b85..4bf014e51f8c 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -569,6 +569,7 @@ static void vlan_dev_set_rx_mode(struct net_device *vlan_dev)
569 * separate class since they always nest. 569 * separate class since they always nest.
570 */ 570 */
571static struct lock_class_key vlan_netdev_xmit_lock_key; 571static struct lock_class_key vlan_netdev_xmit_lock_key;
572static struct lock_class_key vlan_netdev_addr_lock_key;
572 573
573static void vlan_dev_set_lockdep_one(struct net_device *dev, 574static void vlan_dev_set_lockdep_one(struct net_device *dev,
574 struct netdev_queue *txq, 575 struct netdev_queue *txq,
@@ -581,6 +582,9 @@ static void vlan_dev_set_lockdep_one(struct net_device *dev,
581 582
582static void vlan_dev_set_lockdep_class(struct net_device *dev, int subclass) 583static void vlan_dev_set_lockdep_class(struct net_device *dev, int subclass)
583{ 584{
585 lockdep_set_class_and_subclass(&dev->addr_list_lock,
586 &vlan_netdev_addr_lock_key,
587 subclass);
584 netdev_for_each_tx_queue(dev, vlan_dev_set_lockdep_one, &subclass); 588 netdev_for_each_tx_queue(dev, vlan_dev_set_lockdep_one, &subclass);
585} 589}
586 590