stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/3] mptcp: fix fallback-related races
@ 2025-07-14 16:41 Matthieu Baerts (NGI0)
  2025-07-14 16:41 ` [PATCH net 1/3] mptcp: make fallback action and fallback decision atomic Matthieu Baerts (NGI0)
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Matthieu Baerts (NGI0) @ 2025-07-14 16:41 UTC (permalink / raw)
  To: mptcp, Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman
  Cc: netdev, linux-kernel, Matthieu Baerts (NGI0), stable,
	syzbot+5cf807c20386d699b524

This series contains 3 fixes somewhat related to various races we have
while handling fallback.

The root cause of the issues addressed here is that the check for
"we can fallback to tcp now" and the related action are not atomic. That
also applies to fallback due to MP_FAIL -- where the window race is even
wider.

Address the issue introducing an additional spinlock to bundle together
all the relevant events, as per patch 1 and 2. These fixes can be
backported up to v5.19 and v5.15.

Note that mptcp_disconnect() unconditionally clears the fallback status
(zeroing msk->flags) but don't touch the `allows_infinite_fallback`
flag. Such issue is addressed in patch 3, and can be backported up to
v5.17.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Paolo Abeni (3):
      mptcp: make fallback action and fallback decision atomic
      mptcp: plug races between subflow fail and subflow creation
      mptcp: reset fallback status gracefully at disconnect() time

 net/mptcp/options.c  |  3 ++-
 net/mptcp/pm.c       |  8 +++++++-
 net/mptcp/protocol.c | 56 ++++++++++++++++++++++++++++++++++++++++++++--------
 net/mptcp/protocol.h | 29 ++++++++++++++++++++-------
 net/mptcp/subflow.c  | 30 +++++++++++++++++-----------
 5 files changed, 98 insertions(+), 28 deletions(-)
---
base-commit: b640daa2822a39ff76e70200cb2b7b892b896dce
change-id: 20250714-net-mptcp-fallback-races-a99f171cf5ca

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@kernel.org>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-16  0:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-14 16:41 [PATCH net 0/3] mptcp: fix fallback-related races Matthieu Baerts (NGI0)
2025-07-14 16:41 ` [PATCH net 1/3] mptcp: make fallback action and fallback decision atomic Matthieu Baerts (NGI0)
2025-07-14 16:41 ` [PATCH net 2/3] mptcp: plug races between subflow fail and subflow creation Matthieu Baerts (NGI0)
2025-07-14 16:41 ` [PATCH net 3/3] mptcp: reset fallback status gracefully at disconnect() time Matthieu Baerts (NGI0)
2025-07-16  0:40 ` [PATCH net 0/3] mptcp: fix fallback-related races patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).