linux-stable/net
Cong Wang 845e0ebb44 net: change addr_list_lock back to static key
The dynamic key update for addr_list_lock still causes troubles,
for example the following race condition still exists:

CPU 0:				CPU 1:
(RCU read lock)			(RTNL lock)
dev_mc_seq_show()		netdev_update_lockdep_key()
				  -> lockdep_unregister_key()
 -> netif_addr_lock_bh()

because lockdep doesn't provide an API to update it atomically.
Therefore, we have to move it back to static keys and use subclass
for nest locking like before.

In commit 1a33e10e4a ("net: partially revert dynamic lockdep key
changes"), I already reverted most parts of commit ab92d68fc2
("net: core: add generic lockdep keys").

This patch reverts the rest and also part of commit f3b0a18bb6
("net: remove unnecessary variables and callback"). After this
patch, addr_list_lock changes back to using static keys and
subclasses to satisfy lockdep. Thanks to dev->lower_level, we do
not have to change back to ->ndo_get_lock_subclass().

And hopefully this reduces some syzbot lockdep noises too.

Reported-by: syzbot+f3a0e80c34b3fc28ac5e@syzkaller.appspotmail.com
Cc: Taehee Yoo <ap420073@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-06-09 12:59:45 -07:00
..
6lowpan
9p 9pnet: allow making incomplete read requests 2020-03-27 09:29:56 +00:00
802
8021q net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
appletalk ipv4,appletalk: move SIOCADDRT and SIOCDELRT handling into ->compat_ioctl 2020-05-18 17:35:02 -07:00
atm atm: switch do_atmif_sioc() to direct use of atm_dev_ioctl() 2020-05-20 20:31:36 -04:00
ax25 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-24 13:47:27 -07:00
batman-adv net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-06-03 16:27:18 -07:00
bpf bpf: Fix too large copy from user in bpf_test_init 2020-05-19 17:56:34 +02:00
bpfilter bpfilter: document build requirements for bpfilter_umh 2020-05-26 00:03:16 +09:00
bridge net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
caif net: caif: Fix use correct return type for ndo_start_xmit() 2020-04-30 12:13:07 -07:00
can
ceph Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-06-03 16:27:18 -07:00
core net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
dcb
dccp ipv6: move SIOCADDRT and SIOCDELRT handling into ->compat_ioctl 2020-05-18 17:35:02 -07:00
decnet Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-05-01 17:02:27 -07:00
dns_resolver docs: networking: convert dns_resolver.txt to ReST 2020-04-28 14:39:46 -07:00
dsa net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
ethernet net: move devres helpers into a separate source file 2020-05-23 16:56:17 -07:00
ethtool ethtool: linkinfo: remove an unnecessary NULL check 2020-06-05 13:10:02 -07:00
hsr hsr: remove WARN_ONCE() in hsr_fill_frame_info() 2020-05-07 17:40:02 -07:00
ieee802154 ieee802154: 6lowpan: remove unnecessary comparison 2020-05-08 22:25:10 -07:00
ife
ipv4 net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy 2020-06-08 19:08:17 -07:00
ipv6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-06-07 17:27:45 -07:00
iucv net/af_iucv: clean up function prototypes 2020-05-19 12:50:14 -07:00
kcm
key
l2tp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-31 17:48:46 -07:00
l3mdev
lapb docs: networking: convert lapb-module.txt to ReST 2020-04-30 12:56:35 -07:00
llc
mac80211 net: fix wiki website url mac80211 and wireless files 2020-06-08 10:06:05 +02:00
mac802154
mpls net: Make mpls_entry_encode() available for generic users 2020-05-29 21:20:20 -07:00
mptcp mptcp: bugfix for RM_ADDR option parsing 2020-06-08 19:09:41 -07:00
ncsi
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-06-03 16:27:18 -07:00
netlabel netlabel: cope with NULL catmap 2020-05-12 18:12:40 -07:00
netlink genetlink: fix memory leaks in genl_family_rcv_msg_dumpit() 2020-06-04 15:33:45 -07:00
netrom net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
nfc
nsh
openvswitch net: openvswitch: use div_u64() for 64-by-32 divisions 2020-04-25 20:48:21 -07:00
packet
phonet sysctl: pass kernel pointers to ->proc_handler 2020-04-27 02:07:40 -04:00
psample net: psample: fix build error when CONFIG_INET is not enabled 2020-05-23 16:36:05 -07:00
qrtr Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-31 17:48:46 -07:00
rds RDMA 5.8 merge window pull request 2020-06-05 14:05:57 -07:00
rfkill
rose net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
rxrpc rxrpc fixes 2020-06-08 19:13:37 -07:00
sched cls_flower: remove mpls_opts_policy 2020-06-01 12:01:05 -07:00
sctp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-06-03 16:27:18 -07:00
smc RDMA 5.8 merge window pull request 2020-06-05 14:05:57 -07:00
strparser
sunrpc ipv6: add ip6_sock_set_recvpktinfo 2020-05-28 11:11:46 -07:00
switchdev
tipc tipc: fix NULL pointer dereference in streaming 2020-06-04 15:37:59 -07:00
tls bpf: Fix running sk_skb program types with ktls 2020-06-01 14:48:32 -07:00
unix
vmw_vsock vsock/vmci: make vmci_vsock_transport_cb() static 2020-06-05 13:18:26 -07:00
wimax
wireless net: fix wiki website url mac80211 and wireless files 2020-06-08 10:06:05 +02:00
x25 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-06 22:10:13 -07:00
xdp net/xdp: use shift instead of 64 bit division 2020-06-04 16:02:58 -07:00
xfrm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-31 17:48:46 -07:00
Kconfig net: ethtool: netlink: Add support for triggering a cable test 2020-05-10 12:28:41 -07:00
Makefile net: move devres helpers into a separate source file 2020-05-23 16:56:17 -07:00
compat.c switch cmsghdr_from_user_compat_to_kern() to copy_from_user() 2020-06-01 12:05:45 -07:00
devres.c net: devres: provide devm_register_netdev() 2020-05-23 16:56:17 -07:00
socket.c net: remove kernel_setsockopt 2020-05-29 13:10:39 -07:00
sysctl_net.c