]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mptcp: reset fallback status gracefully at disconnect() time
authorPaolo Abeni <pabeni@redhat.com>
Mon, 28 Jul 2025 13:29:23 +0000 (15:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:26:12 +0000 (16:26 +0200)
commitc8a9c17c37574b621735d95a1391970472edd70f
treec321a4b7a1ee299b159e339cfdf1b34d2b8e44cd
parentc476d627584b7589a134a8b48dd5c6639e4401c5
mptcp: reset fallback status gracefully at disconnect() time

commit da9b2fc7b73d147d88abe1922de5ab72d72d7756 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: b29fcfb54cd7 ("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>
[ Conflicts in protocol.c, because commit ebc1e08f01eb ("mptcp: drop
  last_snd and MPTCP_RESET_SCHEDULER") is not in this version and
  changed the context. The same modification can still be applied at the
  same place. ]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mptcp/protocol.c