linux_dsm_epyc7002/net/core
Cong Wang 53d374979e 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: ab92d68fc2 ("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>
2020-01-17 11:02:44 +01:00
..
bpf_sk_storage.c bpf: Switch bpf_map ref counter to atomic64_t so bpf_map_inc() never fails 2019-11-18 11:41:59 +01:00
datagram.c
datagram.h
dev_addr_lists.c
dev_ioctl.c
dev.c net: avoid updating qdisc_xmit_lock_key in netdev_update_lockdep_key() 2020-01-17 11:02:44 +01:00
devlink.c devlink: correct misspelling of snapshot 2020-01-11 14:30:24 -08:00
drop_monitor.c
dst_cache.c
dst.c
ethtool.c
failover.c
fib_notifier.c
fib_rules.c
filter.c bpf: Sockmap/tls, msg_push_data may leave end mark in place 2020-01-15 23:26:13 +01:00
flow_dissector.c treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
flow_offload.c net: core: rename indirect block ingress cb function 2019-12-06 20:45:09 -08:00
gen_estimator.c
gen_stats.c
gro_cells.c
hwbm.c
link_watch.c
lwt_bpf.c net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup 2019-12-04 12:27:13 -08:00
lwtunnel.c
Makefile
neighbour.c neighbour: remove neigh_cleanup() method 2019-12-09 09:48:47 -08:00
net_namespace.c
net-procfs.c
net-sysfs.c net-sysfs: Call dev_hold always in rx_queue_add_kobject 2019-12-17 22:57:11 -08:00
net-sysfs.h
net-traces.c
netclassid_cgroup.c
netevent.c
netpoll.c
netprio_cgroup.c
page_pool.c net: page_pool: add the possibility to sync DMA memory for device 2019-11-20 12:34:28 -08:00
pktgen.c
ptp_classifier.c
request_sock.c
rtnetlink.c net/core: Populate VF index in struct ifla_vf_guid 2019-12-03 11:24:34 -08:00
scm.c
secure_seq.c
skbuff.c net: Fixed updating of ethertype in skb_mpls_push() 2019-12-04 17:11:25 -08:00
skmsg.c bpf: Sockmap, ensure sock lock held during tear down 2020-01-15 23:26:13 +01:00
sock_diag.c
sock_map.c bpf: Sockmap, ensure sock lock held during tear down 2020-01-15 23:26:13 +01:00
sock_reuseport.c
sock.c net: annotate lockless accesses to sk->sk_pacing_shift 2019-12-17 22:09:52 -08:00
stream.c
sysctl_net_core.c net, sysctl: Fix compiler warning when only cBPF is present 2019-12-19 17:17:51 +01:00
timestamping.c
tso.c
utils.c
xdp.c treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00