[PATCH mptcp-next v3 0/5] mptcp: avoid data-races around the sysctls

Gang Yan posted 5 patches 4 days, 12 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20260819125629.49823-1-gang.yan@linux.dev
net/mptcp/ctrl.c     | 141 ++++++++++++++++++++++++++++++++-----------
net/mptcp/pm.c       |  11 ++--
net/mptcp/protocol.c |   3 +-
net/mptcp/protocol.h |   6 +-
net/mptcp/sched.c    |   2 +-
5 files changed, 115 insertions(+), 48 deletions(-)
[PATCH mptcp-next v3 0/5] mptcp: avoid data-races around the sysctls
Posted by Gang Yan 4 days, 12 hours ago
From: Gang Yan <yangang@kylinos.cn>

Changelog:
v3:
  Patch 1:
    - Carries the full module refcount handling that was previously
      deferred to a squash-to patch.
    - mptcp_get_scheduler now returns the ops pointer directly instead
      of copying the name, so mptcp_init_sock() no longer goes through a
      redundant mptcp_sched_find() list walk.
    - A new pernet-level helper 'mptcp_pernet_sched' is shared with
      proc_scheduler().
    - mptcp_net_init releases the default reference on the
      mptcp_pernet_new_table error path.
    - Simplify the commit message.

  Patch 2:
    - Introduce the pernet-level helper mptcp_pernet_pm, like sched
      does.
    - Commit message shows why no moudule reference is taken here for
      addressing sashiko's comments.

  Patch 3:
    - Remove the WRITE_ONCE() part and the tag of Tao Cui.

  Patch 4:
    - It is new in this seires. Followed by Matt's suggestions, add
      comments before pm_type was changes.

  Patch 5:
    - Release the PM reference on the mptcp_net_init errpr path as sched
      does.
    - mptcp_pm_ops_init() now takes the ops pointer directly instead of
      the name, and mptcp_get_path_manager() returns the ops pointer:
      the redundant mptcp_pm_find() list walk from the name is avoided,
      mirroring the scheduler side earlier in this series. 

v2:
  - Split the code around bpf to patch 4 and patch 5.
  - Put WRITE_ONCE(pernet->pm_type, pm_type) into patch 3 and add
    tag of Tao Cui.
  Link: https://patchwork.kernel.org/project/mptcp/cover/20260818094825.48446-1-gang.yan@linux.dev/
v1:
  Link: https://patchwork.kernel.org/project/mptcp/cover/20260817012452.7519-1-gang.yan@linux.dev/

Gang Yan (4):
  mptcp: sched: change scheduler sysctl atomically
  mptcp: pm: change path_manager sysctl atomically
  mptcp: pm: use WRITE_ONCE() for the pm_type sysctl
  Squash to "mptcp: pm: init and release mptcp_pm_ops"

Matthieu Baerts (NGI0) (1):
  mptcp: use READ_ONCE() over sysctls

 net/mptcp/ctrl.c     | 141 ++++++++++++++++++++++++++++++++-----------
 net/mptcp/pm.c       |  11 ++--
 net/mptcp/protocol.c |   3 +-
 net/mptcp/protocol.h |   6 +-
 net/mptcp/sched.c    |   2 +-
 5 files changed, 115 insertions(+), 48 deletions(-)

-- 
2.43.0
Re: [PATCH mptcp-next v3 0/5] mptcp: avoid data-races around the sysctls
Posted by MPTCP CI 3 days, 17 hours ago
Hi Gang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join): Unstable: 1 failed test(s): selftest_simult_flows ⚠️ 
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/32342598821

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/892be88bad84
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1148469


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)