Skip to content

Commit 2bf4514

Browse files
committed
vlan: use netdev_lockdep_set_classes()
JIRA: https://issues.redhat.com/browse/RHEL-6066 Upstream Status: net.git commit 9a3c93a commit 9a3c93a Author: Eric Dumazet <edumazet@google.com> Date: Mon Feb 12 14:06:58 2024 +0000 vlan: use netdev_lockdep_set_classes() vlan uses vlan_dev_set_lockdep_class() which lacks qdisc_tx_busylock initialization. Use generic netdev_lockdep_set_classes() to not worry anymore. Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20240212140700.2795436-2-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Davide Caratti <dcaratti@redhat.com>
1 parent 1cd0ac5 commit 2bf4514

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

net/8021q/vlan_dev.c

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -489,28 +489,6 @@ static void vlan_dev_set_rx_mode(struct net_device *vlan_dev)
489489
dev_uc_sync(vlan_dev_priv(vlan_dev)->real_dev, vlan_dev);
490490
}
491491

492-
/*
493-
* vlan network devices have devices nesting below it, and are a special
494-
* "super class" of normal network devices; split their locks off into a
495-
* separate class since they always nest.
496-
*/
497-
static struct lock_class_key vlan_netdev_xmit_lock_key;
498-
static struct lock_class_key vlan_netdev_addr_lock_key;
499-
500-
static void vlan_dev_set_lockdep_one(struct net_device *dev,
501-
struct netdev_queue *txq,
502-
void *unused)
503-
{
504-
lockdep_set_class(&txq->_xmit_lock, &vlan_netdev_xmit_lock_key);
505-
}
506-
507-
static void vlan_dev_set_lockdep_class(struct net_device *dev)
508-
{
509-
lockdep_set_class(&dev->addr_list_lock,
510-
&vlan_netdev_addr_lock_key);
511-
netdev_for_each_tx_queue(dev, vlan_dev_set_lockdep_one, NULL);
512-
}
513-
514492
static __be16 vlan_parse_protocol(const struct sk_buff *skb)
515493
{
516494
struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data);
@@ -612,7 +590,7 @@ static int vlan_dev_init(struct net_device *dev)
612590

613591
SET_NETDEV_DEVTYPE(dev, &vlan_type);
614592

615-
vlan_dev_set_lockdep_class(dev);
593+
netdev_lockdep_set_classes(dev);
616594

617595
vlan->vlan_pcpu_stats = netdev_alloc_pcpu_stats(struct vlan_pcpu_stats);
618596
if (!vlan->vlan_pcpu_stats)

0 commit comments

Comments
 (0)