From: Matthieu Baerts <matttbe@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Chenguang Zhao <chenguang.zhao@linux.dev>,
mptcp@lists.linux.dev, Chenguang Zhao <zhaochenguang@kylinos.cn>
Subject: Re: [PATCH export v3 2/4] mptcp: reject joins after fallback in mptcp_is_fully_established
Date: Fri, 14 Aug 2026 11:09:30 +0200 [thread overview]
Message-ID: <a52da320-e6f2-4ccb-92ca-7ad28ebd49f2@kernel.org> (raw)
In-Reply-To: <643936d9-5da2-45cc-b108-f7c2e7785044@redhat.com>
Hi Paolo,
Thank you for your reply!
14 Aug 2026 10:43:41 Paolo Abeni <pabeni@redhat.com>:
>
>
> On 8/12/26 5:32 PM, Matthieu Baerts wrote:
>> Hi Paolo, Chenguang,
>>
>> On 12/08/2026 11:45, Paolo Abeni wrote:
>>> On 8/12/26 7:46 AM, Chenguang Zhao wrote:
>>>> From: Chenguang Zhao <zhaochenguang@kylinos.cn>
>>>>
>>>> After fallback, treat the connection as not fully established so later
>>>> MP_JOIN attempts are rejected.
>>
>> @Chenguang: please first reply to the questions and comments from the
>> previous versions, then only send a new version when the discussions are
>> over.
>>
>>>> Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
>>>> ---
>>>> net/mptcp/protocol.h | 5 ++++-
>>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
>>>> index 7e168e450fb0..bf2483a7ed92 100644
>>>> --- a/net/mptcp/protocol.h
>>>> +++ b/net/mptcp/protocol.h
>>>> @@ -957,8 +957,11 @@ static inline void mptcp_start_tout_timer(struct sock *sk)
>>>>
>>>> static inline bool mptcp_is_fully_established(struct sock *sk)
>>>> {
>>>> + struct mptcp_sock *msk = mptcp_sk(sk);
>>>> +
>>>> return inet_sk_state_load(sk) == TCP_ESTABLISHED &&
>>>> - READ_ONCE(mptcp_sk(sk)->fully_established);
>>>> + READ_ONCE(msk->fully_established) &&
>>>> + !test_bit(MPTCP_FALLBACK_DONE, &msk->flags);
>>>
>>> Does the above improve actually anything? The test is inherently racy,
>>> as lack the fallback_lock, and AFAICS all critical paths have already
>>> explicit checks under such lock, see i.e. mptcp_finish_join().
>>
>> Indeed, the fallback lock is missing.
>>
>> Note: Chenguang is looking at a bug where, when an MP_FAIL is received
>> before being in fully_established, the kernel accept going to fully
>> established, and creating new subflows, then reject them once done.
>>
>> Same when receiving a 4th packet without MPTCP options.
>
> It's not clear to me what actually goes wrong and how. Do you have handy
> a event sequence or stack trace demonstrating the critical scenario?
Indeed, better with packetdrill scripts:
https://github.com/chrisocean716-star/packetdrill/blob/bf9be7a7bee3687500444b284a9db2a0009a5252/gtests/net/mptcp/dss/dss_drop_after_data_fallback_server.pkt
=> A fallback is done, a subflow can be initiated, then rejected.
https://github.com/chrisocean716-star/packetdrill/blob/fed57fab92c407eb433acdb8c8ce72bd8e3e2f37/gtests/net/mptcp/mp_join/mp_join_server_after_fallback.pkt
=> The MP_FAIL is partially ignored if received before being in fully
established state.
> Both the above look like bugs in check_fully_established(), or
> incorrect/later check of fallback status/fallback_lock.
>
> i.e. AFAICS active subflows are created and added to the conn_list
> without checking the fallback status/fallback_lock, but the later join
> correctly rejects the subflow finalization, so there should any real
> problems beyond some noise.
For the fallback, it feels wrong but we could say that it's just some noise.
For the MP_FAIL, we should probably not ignore it in this case.
I think the MP_FAIL case should fallback. For both, the fallback should
either disable the fully established state, or the fully established
helpers should look for fallback.
Cheers,
Matt
next prev parent reply other threads:[~2026-08-14 9:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 5:46 [PATCH export v3 0/4] mptcp: fix TCP fallback on single-subflow MP_FAIL Chenguang Zhao
2026-08-12 5:46 ` [PATCH export v3 1/4] mptcp: add MPFailFallback MIB Chenguang Zhao
2026-08-12 5:46 ` [PATCH export v3 2/4] mptcp: reject joins after fallback in mptcp_is_fully_established Chenguang Zhao
2026-08-12 9:45 ` Paolo Abeni
2026-08-12 15:32 ` Matthieu Baerts
2026-08-13 9:32 ` gang.yan
2026-08-13 17:42 ` Matthieu Baerts
2026-08-14 3:02 ` gang.yan
2026-08-14 8:43 ` Paolo Abeni
2026-08-14 9:09 ` Matthieu Baerts [this message]
2026-08-14 11:06 ` Paolo Abeni
2026-08-13 8:45 ` Chenguang Zhao
2026-08-13 18:06 ` Matthieu Baerts
2026-08-12 5:46 ` [PATCH export v3 3/4] mptcp: reset subflow on MP_FAIL when OoO queue is non-empty Chenguang Zhao
2026-08-12 6:07 ` sashiko-bot
2026-08-12 10:02 ` Paolo Abeni
2026-08-13 8:45 ` Chenguang Zhao
2026-08-12 5:46 ` [PATCH export v3 4/4] mptcp: fallback to TCP on MP_FAIL with a single subflow Chenguang Zhao
2026-08-12 10:43 ` Paolo Abeni
2026-08-13 8:48 ` Chenguang Zhao
2026-08-12 10:47 ` Paolo Abeni
2026-08-13 8:50 ` Chenguang Zhao
2026-08-12 6:57 ` [PATCH export v3 0/4] mptcp: fix TCP fallback on single-subflow MP_FAIL 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=a52da320-e6f2-4ccb-92ca-7ad28ebd49f2@kernel.org \
--to=matttbe@kernel.org \
--cc=chenguang.zhao@linux.dev \
--cc=mptcp@lists.linux.dev \
--cc=pabeni@redhat.com \
--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.