net: partially revert dynamic lockdep key changes
This patch reverts the folowing commits: commit064ff66e2b
"bonding: add missing netdev_update_lockdep_key()" commit53d374979e
"net: avoid updating qdisc_xmit_lock_key in netdev_update_lockdep_key()" commit1f26c0d3d2
"net: fix kernel-doc warning in <linux/netdevice.h>" commitab92d68fc2
"net: core: add generic lockdep keys" but keeps the addr_list_lock_key because we still lock addr_list_lock nestedly on stack devices, unlikely xmit_lock this is safe because we don't take addr_list_lock on any fast path. Reported-and-tested-by: syzbot+aaa6fa4949cc5d9b7b25@syzkaller.appspotmail.com Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Taehee Yoo <ap420073@gmail.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
ea84c84290
commit
1a33e10e4a
@@ -1671,6 +1671,15 @@ static int dsa_slave_phy_setup(struct net_device *slave_dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct lock_class_key dsa_slave_netdev_xmit_lock_key;
|
||||
static void dsa_slave_set_lockdep_class_one(struct net_device *dev,
|
||||
struct netdev_queue *txq,
|
||||
void *_unused)
|
||||
{
|
||||
lockdep_set_class(&txq->_xmit_lock,
|
||||
&dsa_slave_netdev_xmit_lock_key);
|
||||
}
|
||||
|
||||
int dsa_slave_suspend(struct net_device *slave_dev)
|
||||
{
|
||||
struct dsa_port *dp = dsa_slave_to_port(slave_dev);
|
||||
@@ -1754,6 +1763,9 @@ int dsa_slave_create(struct dsa_port *port)
|
||||
slave_dev->max_mtu = ETH_MAX_MTU;
|
||||
SET_NETDEV_DEVTYPE(slave_dev, &dsa_type);
|
||||
|
||||
netdev_for_each_tx_queue(slave_dev, dsa_slave_set_lockdep_class_one,
|
||||
NULL);
|
||||
|
||||
SET_NETDEV_DEV(slave_dev, port->ds->dev);
|
||||
slave_dev->dev.of_node = port->dn;
|
||||
slave_dev->vlan_features = master->vlan_features;
|
||||
|
Reference in New Issue
Block a user