acrn-kernel/net/mptcp
Paolo Abeni 3fbcd42b3e mptcp: fix locking for in-kernel listener creation
[ Upstream commit ad2171009d ]

For consistency, in mptcp_pm_nl_create_listen_socket(), we need to
call the __mptcp_nmpc_socket() under the msk socket lock.

Note that as a side effect, mptcp_subflow_create_socket() needs a
'nested' lockdep annotation, as it will acquire the subflow (kernel)
socket lock under the in-kernel listener msk socket lock.

The current lack of locking is almost harmless, because the relevant
socket is not exposed to the user space, but in future we will add
more complexity to the mentioned helper, let's play safe.

Fixes: 1729cf186d ("mptcp: create the listening socket for new port")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-22 12:59:40 +01:00
..
Kconfig
Makefile
bpf.c
crypto.c
crypto_test.c
ctrl.c
diag.c
mib.c
mib.h
mptcp_diag.c
options.c
pm.c mptcp: netlink: respect v4/v6-only sockets 2023-01-24 07:24:37 +01:00
pm_netlink.c mptcp: fix locking for in-kernel listener creation 2023-02-22 12:59:40 +01:00
pm_userspace.c mptcp: netlink: respect v4/v6-only sockets 2023-01-24 07:24:37 +01:00
protocol.c mptcp: do not wait for bare sockets' timeout 2023-02-14 19:11:51 +01:00
protocol.h mptcp: netlink: respect v4/v6-only sockets 2023-01-24 07:24:37 +01:00
sockopt.c mptcp: fix locking for setsockopt corner-case 2023-02-22 12:59:40 +01:00
subflow.c mptcp: fix locking for in-kernel listener creation 2023-02-22 12:59:40 +01:00
syncookies.c
token.c
token_test.c