aboutsummaryrefslogtreecommitdiff
path: root/net/l2tp
diff options
context:
space:
mode:
authorGravatar Cong Wang <xiyou.wangcong@gmail.com> 2020-01-15 13:02:38 -0800
committerGravatar David S. Miller <davem@davemloft.net> 2020-01-17 11:02:44 +0100
commit53d374979ef147ab51f5d632dfe20b14aebeccd0 (patch)
tree8eff9015b047aea4024a5b23a40b13c646b42b3d /net/l2tp
parentnet/sched: act_ife: initalize ife->metalist earlier (diff)
downloadlinux-53d374979ef147ab51f5d632dfe20b14aebeccd0.tar.gz
linux-53d374979ef147ab51f5d632dfe20b14aebeccd0.tar.bz2
linux-53d374979ef147ab51f5d632dfe20b14aebeccd0.zip
net: avoid updating qdisc_xmit_lock_key in netdev_update_lockdep_key()
syzbot reported some bogus lockdep warnings, for example bad unlock balance in sch_direct_xmit(). They are due to a race condition between slow path and fast path, that is qdisc_xmit_lock_key gets re-registered in netdev_update_lockdep_key() on slow path, while we could still acquire the queue->_xmit_lock on fast path in this small window: CPU A CPU B __netif_tx_lock(); lockdep_unregister_key(qdisc_xmit_lock_key); __netif_tx_unlock(); lockdep_register_key(qdisc_xmit_lock_key); In fact, unlike the addr_list_lock which has to be reordered when the master/slave device relationship changes, queue->_xmit_lock is only acquired on fast path and only when NETIF_F_LLTX is not set, so there is likely no nested locking for it. Therefore, we can just get rid of re-registration of qdisc_xmit_lock_key. Reported-by: syzbot+4ec99438ed7450da6272@syzkaller.appspotmail.com Fixes: ab92d68fc22f ("net: core: add generic lockdep keys") 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>
Diffstat (limited to 'net/l2tp')
0 files changed, 0 insertions, 0 deletions