linux/net/mptcp
Paolo Abeni 938126995e mptcp: reset fallback status gracefully at disconnect() time
commit da9b2fc7b7 upstream.

mptcp_disconnect() clears the fallback bit unconditionally, without
touching the associated flags.

The bit clear is safe, as no fallback operation can race with that --
all subflow are already in TCP_CLOSE status thanks to the previous
FASTCLOSE -- but we need to consistently reset all the fallback related
status.

Also acquire the relevant lock, to avoid fouling static analyzers.

Fixes: b29fcfb54c ("mptcp: full disconnect implementation")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250714-net-mptcp-fallback-races-v1-3-391aff963322@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-07-24 08:56:24 +02:00
..
bpf.c bpf: Add update_socket_protocol hook 2023-08-16 10:22:16 -07:00
crypto.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
crypto_test.c mptcp: fill in missing MODULE_DESCRIPTION() 2023-12-17 20:54:22 +00:00
ctrl.c mptcp: blackhole only if 1st SYN retrans w/o MPC is accepted 2025-02-08 09:58:16 +01:00
diag.c mptcp: annotate data-races around subflow->fully_established 2024-12-14 20:03:52 +01:00
fastopen.c mptcp: pr_debug: add missing \n at the end 2024-08-27 14:45:16 -07:00
Kconfig kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
Makefile net: mptcp: use policy generated by YAML spec 2023-10-24 13:00:32 -07:00
mib.c mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-15 10:57:02 -07:00
mib.h mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-15 10:57:02 -07:00
mptcp_diag.c mptcp: drop duplicate header inclusions 2024-03-06 20:24:10 -08:00
mptcp_pm_gen.c mptcp: no admin perm to list endpoints 2024-11-05 17:51:08 -08:00
mptcp_pm_gen.h mptcp: add token for get-addr in yaml 2024-03-04 13:07:45 +00:00
options.c mptcp: make fallback action and fallback decision atomic 2025-07-24 08:56:23 +02:00
pm.c mptcp: plug races between subflow fail and subflow creation 2025-07-24 08:56:24 +02:00
pm_netlink.c mptcp: fix 'scheduling while atomic' in mptcp_pm_nl_append_new_local_addr 2025-03-13 13:01:55 +01:00
pm_userspace.c mptcp: pm: userspace: flags: clearer msg if no remote addr 2025-05-29 11:02:56 +02:00
protocol.c mptcp: reset fallback status gracefully at disconnect() time 2025-07-24 08:56:24 +02:00
protocol.h mptcp: plug races between subflow fail and subflow creation 2025-07-24 08:56:24 +02:00
sched.c mptcp: pr_debug: add missing \n at the end 2024-08-27 14:45:16 -07:00
sockopt.c mptcp: sockopt: fix getting freebind & transparent 2025-04-20 10:15:38 +02:00
subflow.c mptcp: plug races between subflow fail and subflow creation 2025-07-24 08:56:24 +02:00
syncookies.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
token.c mptcp: add statistics for mptcp socket in use 2023-01-09 07:30:50 +00:00
token_test.c mptcp: token kunit: set protocol 2024-02-26 18:42:12 -08:00