Skip to content

mptcp: fix duplicate subflow creation

Paolo Abeni mptcp 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 6 repliesIn review
  2. v14 patches 5 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mptcp: fix lockless access in subflow ULP diaginclude/net/tcp.h net/mptcp/diag.c net/tls/tls_main.c+7 -30 replies
2/4mptcp: fix data races on local_idnet/mptcp/diag.c net/mptcp/pm_netlink.c net/mptcp/pm_userspace.c +3 more+23 -130 replies
3/4mptcp: fix data races on remote_idnet/mptcp/pm_netlink.c net/mptcp/subflow.c+7 -70 replies
4/4mptcp: fix duplicate subflow creationnet/mptcp/pm_netlink.c+18 -154 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMat Martineau
SeriesR-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH mptcp-net v2 0/4] mptcp: fix duplicate subflow creation

As reported by Mat, the in kernel PM can, in some edge scenarios, unexpectedly create multiple subflows with the same local and remote address.

The real fix is implemented by patch 4/4 with some more accurate check at subflow creation time.

Patches 1-3 are roughly optional pre-requisities, added to avoid introducing more data-races with the actual fix. Patch 1/4 is a bit debatable, as it changes the existing ULP API, but I could not find a better solution and there is some similar prior art:
commit 0df48c26d841 ("tcp: add tcpi_bytes_acked to tcp_info")

This address feedback from Mat on v1, see the patches changelog for the details (no changes in patch 1/4).

Paolo Abeni (4):
mptcp: fix lockless access in subflow ULP diag
mptcp: fix data races on local_id
mptcp: fix data races on remote_id
mptcp: fix duplicate subflow creation

 include/net/tcp.h        |  2 +-
 net/mptcp/diag.c         |  8 +++++--
 net/mptcp/pm_netlink.c   | 45 +++++++++++++++++++++-------------------
 net/mptcp/pm_userspace.c |  2 +-
 net/mptcp/protocol.c     |  2 +-
 net/mptcp/protocol.h     | 15 +++++++++++---
 net/mptcp/subflow.c      | 15 +++++++-------
 net/tls/tls_main.c       |  2 +-
 8 files changed, 54 insertions(+), 37 deletions(-)
Signature · 1 line
2.43.0