All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gang Yan <gang.yan@linux.dev>
To: mptcp@lists.linux.dev
Subject: [PATCH mptcp-next v5 0/6] mptcp: avoid data-races around the sysctls
Date: Fri, 28 Aug 2026 14:06:37 +0800	[thread overview]
Message-ID: <20260828060643.14397-1-gang.yan@linux.dev> (raw)

From: Gang Yan <yangang@kylinos.cn>

Changelog:
v5:
 - Patch 6 fixes the use-after-free reported by sashiko in [1]:
   the module reference is now taken inside the same RCU read section as the
   pointer fetch in mptcp_pm_data_reset(), so the ops cannot be freed between
   rcu_read_unlock() and the bpf_try_module_get() that previously lived in
   mptcp_pm_ops_init(). The reference hand-over is seamless: RCU protects
   the fetch, the refcount protects the use. As a consequence,
   mptcp_pm_ops_init() now expects an already-pinned ops and no longer takes
   a reference itself; the fallback to the built-in mptcp_pm_kernel needs no
   reference.

v4:
 Link: https://patchwork.kernel.org/project/mptcp/cover/20260824073625.57471-1-gang.yan@linux.dev/

v3:
 Link: https://patchwork.kernel.org/project/mptcp/cover/20260819125629.49823-1-gang.yan@linux.dev/

v2:
 Link: https://patchwork.kernel.org/project/mptcp/cover/20260818094825.48446-1-gang.yan@linux.dev/

v2:
 Link: https://patchwork.kernel.org/project/mptcp/cover/20260817012452.7519-1-gang.yan@linux.dev/

[1] https://sashiko.dev/#/patchset/20260824073625.57471-1-gang.yan@linux.dev?part=6

Gang Yan (5):
  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"
  Squash to previous one

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

 net/mptcp/ctrl.c     | 141 ++++++++++++++++++++++++++++++++-----------
 net/mptcp/pm.c       |  65 ++++++++++++++------
 net/mptcp/protocol.c |   7 ++-
 net/mptcp/protocol.h |   9 +--
 net/mptcp/sched.c    |   2 +-
 net/mptcp/subflow.c  |   9 ++-
 6 files changed, 172 insertions(+), 61 deletions(-)

-- 
2.43.0


             reply	other threads:[~2026-08-28  6:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28  6:06 Gang Yan [this message]
2026-08-28  6:06 ` [PATCH mptcp-next v5 1/6] mptcp: sched: change scheduler sysctl atomically Gang Yan
2026-08-28  6:06 ` [PATCH mptcp-next v5 2/6] mptcp: pm: change path_manager " Gang Yan
2026-08-28  6:06 ` [PATCH mptcp-next v5 3/6] mptcp: use READ_ONCE() over sysctls Gang Yan
2026-08-28  6:06 ` [PATCH mptcp-next v5 4/6] mptcp: pm: use WRITE_ONCE() for the pm_type sysctl Gang Yan
2026-08-28  6:06 ` [PATCH mptcp-next v5 5/6] Squash-to "mptcp: pm: init and release mptcp_pm_ops" Gang Yan
2026-08-28  6:06 ` [PATCH mptcp-next v5 6/6] Squash to previous one Gang Yan
2026-08-28  6:21   ` sashiko-bot
2026-08-28  7:14 ` [PATCH mptcp-next v5 0/6] mptcp: avoid data-races around the sysctls MPTCP CI

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=20260828060643.14397-1-gang.yan@linux.dev \
    --to=gang.yan@linux.dev \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.