linux/net/mptcp
Paolo Abeni 81c1d02901 mptcp: consolidate fallback and non fallback state machine
An orphaned msk releases the used resources via the worker,
when the latter first see the msk in CLOSED status.

If the msk status transitions to TCP_CLOSE in the release callback
invoked by the worker's final release_sock(), such instance of the
workqueue will not take any action.

Additionally the MPTCP code prevents scheduling the worker once the
socket reaches the CLOSE status: such msk resources will be leaked.

The only code path that can trigger the above scenario is the
__mptcp_check_send_data_fin() in fallback mode.

Address the issue removing the special handling of fallback socket
in __mptcp_check_send_data_fin(), consolidating the state machine
for fallback and non fallback socket.

Since non-fallback sockets do not send and do not receive data_fin,
the mptcp code can update the msk internal status to match the next
step in the SM every time data fin (ack) should be generated or
received.

As a consequence we can remove a bunch of checks for fallback from
the fastpath.

Fixes: 6e628cd3a8 ("mptcp: use mptcp release_cb for delayed tasks")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-06-21 22:44:54 -07:00
..
bpf.c bpf: Add bpf_skc_to_mptcp_sock_proto 2022-05-20 15:29:00 -07:00
crypto_test.c mptcp: move crypto test to KUNIT 2020-06-26 16:21:39 -07:00
crypto.c kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -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: fix NULL pointer dereference on fastopen early fallback 2023-04-13 09:58:55 -07: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: remove unused 'remaining' variable 2023-04-17 08:25:33 +01:00
pm_netlink.c mptcp: only send RM_ADDR in nl_cmd_remove 2023-06-05 15:15:57 +01:00
pm_userspace.c mptcp: update userspace pm infos 2023-06-05 15:15:57 +01:00
pm.c mptcp: update userspace pm infos 2023-06-05 15:15:57 +01:00
protocol.c mptcp: consolidate fallback and non fallback state machine 2023-06-21 22:44:54 -07:00
protocol.h mptcp: only send RM_ADDR in nl_cmd_remove 2023-06-05 15:15:57 +01:00
sockopt.c mptcp: move first subflow allocation at mpc access time 2023-04-17 08:18:34 +01:00
subflow.c mptcp: consolidate fallback and non fallback state machine 2023-06-21 22:44:54 -07:00
syncookies.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
token_test.c mptcp: init sk->sk_prot in build_msk() 2023-01-09 07:30:50 +00:00
token.c mptcp: add statistics for mptcp socket in use 2023-01-09 07:30:50 +00:00