linux-stable/net/mptcp
Paolo Abeni 3391f526fc 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:38:06 +01:00
..
bpf.c bpf: Add bpf_skc_to_mptcp_sock_proto 2022-05-20 15:29:00 -07:00
crypto.c kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
crypto_test.c mptcp: move crypto test to KUNIT 2020-06-26 16:21:39 -07:00
ctrl.c mptcp: Add a per-namespace sysctl to set the default path manager type 2022-04-29 17:25:14 -07:00
diag.c mptcp: allow dumping subflow context to userspace 2020-03-29 22:14:48 -07:00
fastopen.c mptcp: add subflow_v(4,6)_send_synack() 2022-11-29 20:24:25 -08:00
Kconfig kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
Makefile mptcp: implement delayed seq generation for passive fastopen 2022-11-29 20:24:25 -08:00
mib.c mptcp: add more offered MIBs counter 2022-05-05 19:00:16 -07:00
mib.h mptcp: add more offered MIBs counter 2022-05-05 19:00:16 -07:00
mptcp_diag.c tcp: Access &tcp_hashinfo via net. 2022-09-20 10:21:49 -07:00
options.c mptcp: implement delayed seq generation for passive fastopen 2022-11-29 20:24:25 -08:00
pm.c mptcp: netlink: respect v4/v6-only sockets 2023-01-13 21:55:45 -08:00
pm_netlink.c mptcp: fix lockdep false positive in mptcp_pm_nl_create_listen_socket() 2023-03-22 13:38:06 +01:00
pm_userspace.c mptcp: netlink: respect v4/v6-only sockets 2023-01-13 21:55:45 -08:00
protocol.c mptcp: fix UaF in listener shutdown 2023-03-22 13:38:05 +01:00
protocol.h mptcp: fix UaF in listener shutdown 2023-03-22 13:38:05 +01:00
sockopt.c mptcp: fix locking for setsockopt corner-case 2023-02-08 09:39:34 +00:00
subflow.c mptcp: avoid setting TCP_CLOSE state twice 2023-03-22 13:38:05 +01:00
syncookies.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
token.c mptcp: Fix grammar in a comment 2022-11-11 21:19:47 -08:00
token_test.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00