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
@@ -3041,6 +3041,27 @@ static void prism2_clear_set_tim_queue(local_info_t *local)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* HostAP uses two layers of net devices, where the inner
|
||||
* layer gets called all the time from the outer layer.
|
||||
* This is a natural nesting, which needs a split lock type.
|
||||
*/
|
||||
static struct lock_class_key hostap_netdev_xmit_lock_key;
|
||||
|
||||
static void prism2_set_lockdep_class_one(struct net_device *dev,
|
||||
struct netdev_queue *txq,
|
||||
void *_unused)
|
||||
{
|
||||
lockdep_set_class(&txq->_xmit_lock,
|
||||
&hostap_netdev_xmit_lock_key);
|
||||
}
|
||||
|
||||
static void prism2_set_lockdep_class(struct net_device *dev)
|
||||
{
|
||||
netdev_for_each_tx_queue(dev, prism2_set_lockdep_class_one, NULL);
|
||||
}
|
||||
|
||||
static struct net_device *
|
||||
prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx,
|
||||
struct device *sdev)
|
||||
@@ -3199,6 +3220,7 @@ while (0)
|
||||
if (ret >= 0)
|
||||
ret = register_netdevice(dev);
|
||||
|
||||
prism2_set_lockdep_class(dev);
|
||||
rtnl_unlock();
|
||||
if (ret < 0) {
|
||||
printk(KERN_WARNING "%s: register netdevice failed!\n",
|
||||
|
Reference in New Issue
Block a user