linux-stable/net
Guillaume Nault 73b10060f6 netns: protect netns ID lookups with RCU
commit 2dce224f46 upstream.

__peernet2id() can be protected by RCU as it only calls idr_for_each(),
which is RCU-safe, and never modifies the nsid table.

rtnl_net_dumpid() can also do lockless lookups. It does two nested
idr_for_each() calls on nsid tables (one direct call and one indirect
call because of rtnl_net_dumpid_one() calling __peernet2id()). The
netnsid tables are never updated. Therefore it is safe to not take the
nsid_lock and run within an RCU-critical section instead.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
2021-09-22 11:45:23 +02:00
..
6lowpan
9p
802 net/802/garp: fix memleak in garp_request_join() 2021-08-04 12:22:14 +02:00
8021q
appletalk
atm
ax25
batman-adv batman-adv: Avoid WARN_ON timing related checks 2021-06-30 08:48:48 -04:00
bluetooth Bluetooth: add timeout sanity check to hci_inquiry 2021-09-22 11:45:21 +02:00
bpf
bridge net: bridge: fix memleak in br_add_if() 2021-08-26 08:37:02 -04:00
caif net: fix uninit-value in caif_seqpkt_sendmsg 2021-07-28 11:12:18 +02:00
can can: raw: raw_setsockopt(): fix raw_rcv panic for sock UAF 2021-08-04 12:22:15 +02:00
ceph
core netns: protect netns ID lookups with RCU 2021-09-22 11:45:23 +02:00
dcb
dccp dccp: add do-while-0 stubs for dccp_pr_debug macros 2021-08-26 08:37:08 -04:00
decnet net: decnet: Fix sleeping inside in af_decnet 2021-07-28 11:12:18 +02:00
dns_resolver
dsa
ethernet
hsr hsr: use netdev_err() instead of WARN_ONCE() 2021-05-22 10:57:24 +02:00
ieee802154 net: Fix memory leak in ieee802154_raw_deliver 2021-08-26 08:37:02 -04:00
ife
ipv4 ipv4: make exception cache less predictible 2021-09-22 11:45:22 +02:00
ipv6 ipv6: tcp: drop silly ICMPv6 packet too big messages 2021-07-28 11:12:16 +02:00
ipx
iucv
kcm
key
l2tp
l3mdev
lapb
llc net: llc: fix skb_over_panic 2021-08-04 12:22:17 +02:00
mac80211 mac80211: Fix insufficient headroom issue for AMSDU 2021-09-22 11:45:21 +02:00
mac802154
mpls
ncsi
netfilter netfilter: nft_exthdr: fix endianness of tcp option cast 2021-08-26 08:37:10 -04:00
netlabel net: cipso: fix warnings in netlbl_cipsov4_add_std 2021-09-22 11:45:19 +02:00
netlink netlink: disable IRQs for netlink_lock_table() 2021-06-16 11:53:01 +02:00
netrom netrom: Decrease sock refcount when sock timers expire 2021-07-28 11:12:18 +02:00
nfc net/nfc/rawsock.c: fix a permission check bug 2021-06-16 11:53:00 +02:00
nsh
openvswitch openvswitch: fix stack OOB read while fragmenting IPv4 packets 2021-05-22 10:57:21 +02:00
packet net/packet: annotate accesses to po->ifindex 2021-06-30 08:48:58 -04:00
phonet
psample
qrtr
rds net/rds: dma_map_sg is entitled to merge entries 2021-09-03 09:56:26 +02:00
rfkill
rose
rxrpc
sched net: sched: Fix qdisc_rate_table refcount leak when get tcf_block failed 2021-09-22 11:45:22 +02:00
sctp sctp: fix return value check in __sctp_rcv_asconf_lookup 2021-08-04 12:22:17 +02:00
smc
strparser
sunrpc SUNRPC: Should wake up the privileged task firstly. 2021-07-20 16:17:29 +02:00
switchdev
tipc tipc: fix sleeping in tipc accept routine 2021-08-04 12:22:16 +02:00
tls
unix af_unix: fix garbage collect vs MSG_PEEK 2021-08-04 12:22:14 +02:00
vmw_vsock vsock/virtio: avoid potential deadlock when vsock device remove 2021-08-26 08:37:02 -04:00
wimax
wireless cfg80211: Fix possible memory leak in function cfg80211_bss_update 2021-08-04 12:22:16 +02:00
x25 net/x25: Return the correct errno code 2021-06-30 08:48:47 -04:00
xfrm xfrm: Fix error reporting in xfrm_state_construct. 2021-07-20 16:17:44 +02:00
compat.c net: Return the correct errno code 2021-06-30 08:48:47 -04:00
Kconfig
Makefile net: split out functions related to registering inflight socket files 2021-08-04 12:22:14 +02:00
socket.c
sysctl_net.c