linux/net
Paolo Abeni c3c3d36430 mptcp: fix lockdep false positive in mptcp_pm_nl_create_listen_socket()
commit cee4034a3d upstream.

Christoph reports a lockdep splat in the mptcp_subflow_create_socket()
error path, when such function is invoked by
mptcp_pm_nl_create_listen_socket().

Such code path acquires two separates, nested socket lock, with the
internal lock operation lacking the "nested" annotation. Adding that
in sock_release() for mptcp's sake only could be confusing.

Instead just add a new lockclass to the in-kernel msk socket,
re-initializing the lockdep infra after the socket creation.

Fixes: ad2171009d ("mptcp: fix locking for in-kernel listener creation")
Cc: stable@vger.kernel.org
Reported-by: Christoph Paasch <cpaasch@apple.com>
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/354
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Tested-by: Christoph Paasch <cpaasch@apple.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-22 13:34:02 +01:00
..
6lowpan
9p net/9p: fix bug in client create for .L 2023-03-22 13:33:54 +01:00
802
8021q
appletalk
atm
ax25
batman-adv
bluetooth
bpf Revert "bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES" 2023-03-17 08:50:32 +01:00
bpfilter
bridge netfilter: ebtables: fix table blob use-after-free 2023-03-11 13:55:24 +01:00
caif net: caif: Fix use-after-free in cfusbl_device_notify() 2023-03-17 08:50:24 +01:00
can
ceph
core net: use indirect calls helpers for sk_exit_memory_pressure() 2023-03-17 08:50:24 +01:00
dcb
dccp
dns_resolver
dsa net: dsa: don't error out when drivers return ETH_DATA_LEN in .port_max_mtu() 2023-03-22 13:33:49 +01:00
ethernet
ethtool
hsr
ieee802154
ife
ipv4 ipv4: Fix incorrect table ID in IOCTL path 2023-03-22 13:33:50 +01:00
ipv6 net: tunnels: annotate lockless accesses to dev->needed_headroom 2023-03-22 13:33:46 +01:00
iucv net/iucv: Fix size of interrupt data 2023-03-22 13:33:50 +01:00
kcm
key
l2tp
l3mdev
lapb
llc
mac80211
mac802154
mctp
mpls
mptcp mptcp: fix lockdep false positive in mptcp_pm_nl_create_listen_socket() 2023-03-22 13:34:02 +01:00
ncsi
netfilter netfilter: nft_redir: correct value of inet type .maxattrs 2023-03-22 13:33:42 +01:00
netlabel
netlink
netrom
nfc nfc: change order inside nfc_se_io error path 2023-03-17 08:50:17 +01:00
nsh
openvswitch
packet
phonet
psample
qrtr
rds
rfkill
rose
rxrpc
sched net/sched: act_sample: fix action bind logic 2023-03-11 13:55:28 +01:00
sctp sctp: add a refcnt in sctp_stream_priorities to avoid a nested loop 2023-03-11 13:55:26 +01:00
smc net/smc: fix deadlock triggered by cancel_delayed_work_syn() 2023-03-22 13:33:47 +01:00
strparser
sunrpc SUNRPC: Fix a server shutdown leak 2023-03-17 08:50:28 +01:00
switchdev
tipc
tls net: tls: fix device-offloaded sendpage straddling records 2023-03-17 08:50:26 +01:00
unix af_unix: fix struct pid leaks in OOB support 2023-03-17 08:50:28 +01:00
vmw_vsock
wireless wifi: cfg80211: fix MLO connection ownership 2023-03-22 13:33:43 +01:00
x25
xdp
xfrm xfrm: Allow transport-mode states with AF_UNSPEC selector 2023-03-22 13:33:38 +01:00
compat.c
devres.c
Kconfig
Kconfig.debug
Makefile
socket.c net: avoid double iput when sock_alloc_file fails 2023-03-10 09:34:34 +01:00
sysctl_net.c