mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: mptcp@lists.linux.dev
Subject: [PATCH mptcp-net v2 0/5] mptcp: fix fallback-related races
Date: Sat,  5 Jul 2025 09:24:44 +0200	[thread overview]
Message-ID: <cover.1751699999.git.pabeni@redhat.com> (raw)

This series contains 3 fixes somewhat related to various races we have
while handling fallback and 2 small follow-up likely more suited for
net-next.

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.

Note that mptcp_disconnect() unconditionally
clears the fallback status (zeroing msk->flags) and that may race with
operation still running on the (closing) subflows.

Such race is addressed in patch 3.

Patch 4 cleans up a bit the fallback code, introducing specific MIB for
each FB reason, and patch 5 drops the, hopefully now redundandt
pr_fallback().

Paolo Abeni (5):
  mptcp: make fallback action and fallback decision atomic
  mptcp: plug races between subflow fail and subflow creation
  mptcp: fix status reset on disconnect()
  mptcp: track fallbacks accurately via mibs
  mptcp: remove pr_fallback()

 net/mptcp/ctrl.c     |   4 +-
 net/mptcp/mib.c      |   5 ++
 net/mptcp/mib.h      |   7 +++
 net/mptcp/options.c  |   4 +-
 net/mptcp/pm.c       |   8 ++-
 net/mptcp/protocol.c | 126 +++++++++++++++++++++++++++++++++++--------
 net/mptcp/protocol.h |  35 ++++++------
 net/mptcp/subflow.c  |  35 ++++++------
 8 files changed, 164 insertions(+), 60 deletions(-)

-- 
2.49.0


             reply	other threads:[~2025-07-05  7:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-05  7:24 Paolo Abeni [this message]
2025-07-05  7:24 ` [PATCH mptcp-net v2 1/5] mptcp: make fallback action and fallback decision atomic Paolo Abeni
2025-07-08 14:54   ` Matthieu Baerts
2025-07-08 15:13     ` Matthieu Baerts
2025-07-09  9:09     ` Paolo Abeni
2025-07-05  7:24 ` [PATCH mptcp-net v2 2/5] mptcp: plug races between subflow fail and subflow creation Paolo Abeni
2025-07-08 15:42   ` Matthieu Baerts
2025-07-09  9:14     ` Paolo Abeni
2025-07-09  9:18       ` Matthieu Baerts
2025-07-05  7:24 ` [PATCH mptcp-net v2 3/5] mptcp: fix status reset on disconnect() Paolo Abeni
2025-07-08 15:43   ` Matthieu Baerts
2025-07-09  9:27     ` Paolo Abeni
2025-07-09 10:39       ` Matthieu Baerts
2025-07-09 10:49         ` Paolo Abeni
2025-07-09 10:55           ` Matthieu Baerts
2025-07-09 12:33             ` Paolo Abeni
2025-07-05  7:24 ` [PATCH mptcp-net v2 4/5] mptcp: track fallbacks accurately via mibs Paolo Abeni
2025-07-08 15:56   ` Matthieu Baerts
2025-07-09  9:55     ` Paolo Abeni
2025-07-09 10:23       ` Paolo Abeni
2025-07-09 10:42         ` Matthieu Baerts
2025-07-09 10:55       ` Matthieu Baerts
2025-07-05  7:24 ` [PATCH mptcp-net v2 5/5] mptcp: remove pr_fallback() Paolo Abeni
2025-07-05 18:04   ` kernel test robot
2025-07-08 15:57   ` Matthieu Baerts
2025-07-07  7:43 ` [PATCH mptcp-net v2 0/5] mptcp: fix fallback-related races MPTCP CI
2025-07-07  8:47 ` MPTCP CI
2025-07-08 15:41 ` Matthieu Baerts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1751699999.git.pabeni@redhat.com \
    --to=pabeni@redhat.com \
    --cc=mptcp@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).