All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Chenguang Zhao <chenguang.zhao@linux.dev>, mptcp@lists.linux.dev
Cc: Chenguang Zhao <zhaochenguang@kylinos.cn>
Subject: Re: [PATCH mptcp-net v2 2/3] mptcp: use READ/WRITE_ONCE for allow_subflows
Date: Mon, 10 Aug 2026 20:26:41 +0200	[thread overview]
Message-ID: <9bd91066-7a30-4f6b-aaa4-3f53c85291d7@kernel.org> (raw)
In-Reply-To: <20260715061830.1057851-3-chenguang.zhao@linux.dev>

Hi Chenguang,

On 15/07/2026 08:18, Chenguang Zhao wrote:
> From: Chenguang Zhao <zhaochenguang@kylinos.cn>
> 
> mptcp_is_fully_established() may read allow_subflows without holding
> fallback_lock. Annotate all allow_subflows accesses with READ_ONCE and
> WRITE_ONCE to avoid data-race warnings and make the concurrency model
> explicit.

Is it not enough to use READ_ONCE only with mptcp_is_fully_established?

The others read this variable with fallback_lock. WRITE_ONCE is still
needed.

Or maybe mptcp_is_fully_established should check allow_subflows while
holding fallback_lock? (I didn't check what's best, but I don't think
this helper is used in fast paths)

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  reply	other threads:[~2026-08-10 18:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15  6:18 [PATCH mptcp-net v2 0/3] mptcp: fix TCP fallback on single-subflow MP_FAIL Chenguang Zhao
2026-07-15  6:18 ` [PATCH mptcp-net v2 1/3] mptcp: fallback to TCP on MP_FAIL with a single subflow Chenguang Zhao
2026-08-10 18:26   ` Matthieu Baerts
2026-07-15  6:18 ` [PATCH mptcp-net v2 2/3] mptcp: use READ/WRITE_ONCE for allow_subflows Chenguang Zhao
2026-08-10 18:26   ` Matthieu Baerts [this message]
2026-07-15  6:18 ` [PATCH mptcp-net v2 3/3] mptcp: add MPFailFallback MIB for MP_FAIL TCP fallback Chenguang Zhao
2026-08-10 18:26 ` [PATCH mptcp-net v2 0/3] mptcp: fix TCP fallback on single-subflow MP_FAIL 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=9bd91066-7a30-4f6b-aaa4-3f53c85291d7@kernel.org \
    --to=matttbe@kernel.org \
    --cc=chenguang.zhao@linux.dev \
    --cc=mptcp@lists.linux.dev \
    --cc=zhaochenguang@kylinos.cn \
    /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.