From: Matthieu Baerts <matttbe@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>, MPTCP Linux <mptcp@lists.linux.dev>
Cc: Chenguang Zhao <chenguang.zhao@linux.dev>, gang.yan@linux.dev
Subject: Re: [PATCH mptcp-next RFC 2/3] mptcp: reject MP_JOIN earlier
Date: Mon, 17 Aug 2026 11:49:34 +0200 [thread overview]
Message-ID: <f5ba94b7-449f-45d1-b98e-c997faefa4ee@kernel.org> (raw)
In-Reply-To: <e277308e-87b5-4c1c-b976-ff73cf4286a1@redhat.com>
Hi Paolo,
Thank you for having looked at this!
On 17/08/2026 09:27, Paolo Abeni wrote:
> On 8/14/26 8:31 PM, Matthieu Baerts (NGI0) wrote:
>> @@ -91,12 +92,22 @@ static struct mptcp_sock *subflow_token_join_request(struct request_sock *req)
>> msk = mptcp_token_get_sock(sock_net(req_to_sk(req)), subflow_req->token);
>> if (!msk) {
>> SUBFLOW_REQ_INC_STATS(req, MPTCP_MIB_JOINNOTOKEN);
>> + *reason = MPTCP_RST_EMPTCP;
>> + return NULL;
>> + }
>> +
>> + /* Stop it early if the subflow cannot be accepted */
>> + if (!mptcp_can_accept_new_subflow(msk)) {
>
> Side note: the above is inherently racy, the consistency safeguard is
> given by the fallback check at finish_join time.
Just to be sure: even if it is racy, is it OK to use it here but
continuing having the safe check at finish_join time?
In other words, having such a comment is enough?
/* Stop it early if the subflow cannot be accepted.
* This check is inherently racy, the consistency safeguard is
* given by the fallback check at finish_join time.
*/
> Minor nit: I'm not sure this check belongs here or in
> subflow_check_req(). The latter option would avoid the additional
> argument and possibly produce a smaller diff (and smaller code).
After re-looking at this code yesterday, I agree with you. Also, I think
subflow_token_join_request() should only return the msk, and not
changing anything else from subflow_req.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-08-17 9:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 18:31 [PATCH mptcp-next RFC 0/3] mptcp: reset fully_estab after fallback & reject MPJ earlier Matthieu Baerts (NGI0)
2026-08-14 18:31 ` [PATCH mptcp-next RFC 1/3] mptcp: no longer fully_established after a fallback Matthieu Baerts (NGI0)
2026-08-14 18:31 ` [PATCH mptcp-next RFC 2/3] mptcp: reject MP_JOIN earlier Matthieu Baerts (NGI0)
2026-08-14 18:40 ` sashiko-bot
2026-08-16 16:12 ` Matthieu Baerts
2026-08-16 16:13 ` Matthieu Baerts
2026-08-17 7:27 ` Paolo Abeni
2026-08-17 9:49 ` Matthieu Baerts [this message]
2026-08-17 13:03 ` Paolo Abeni
2026-08-14 18:31 ` [PATCH mptcp-next RFC 3/3] mptcp: pm: kernel: skip operating on closing connections Matthieu Baerts (NGI0)
2026-08-14 18:44 ` sashiko-bot
2026-08-17 7:39 ` Paolo Abeni
2026-08-17 11:07 ` Matthieu Baerts
2026-08-17 13:09 ` Paolo Abeni
2026-08-17 15:32 ` 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=f5ba94b7-449f-45d1-b98e-c997faefa4ee@kernel.org \
--to=matttbe@kernel.org \
--cc=chenguang.zhao@linux.dev \
--cc=gang.yan@linux.dev \
--cc=mptcp@lists.linux.dev \
--cc=pabeni@redhat.com \
/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.