[PATCH net 0/3] mptcp: fix fallback-related races

Matthieu Baerts (NGI0) posted 3 patches 2 months ago
Failed in applying to current master (apply log)
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(-)
[PATCH net 0/3] mptcp: fix fallback-related races
Posted by Matthieu Baerts (NGI0) 2 months ago
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>
Re: [PATCH net 0/3] mptcp: fix fallback-related races
Posted by patchwork-bot+netdevbpf@kernel.org 2 months ago
Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 14 Jul 2025 18:41:43 +0200 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net,1/3] mptcp: make fallback action and fallback decision atomic
    https://git.kernel.org/netdev/net/c/f8a1d9b18c5e
  - [net,2/3] mptcp: plug races between subflow fail and subflow creation
    https://git.kernel.org/netdev/net/c/def5b7b2643e
  - [net,3/3] mptcp: reset fallback status gracefully at disconnect() time
    https://git.kernel.org/netdev/net/c/da9b2fc7b73d

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html