All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Paolo Abeni" <pabeni@redhat.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-net 2/2] Squash-to: "mptcp: do not reschedule the RTX timer for fallback sockets"
Date: Wed, 26 Aug 2026 10:30:37 +0000	[thread overview]
Message-ID: <20260826103038.1CE861F000E9@smtp.kernel.org> (raw)
In-Reply-To: <3d8a1534a8b0609c6ddcd593f4ed8957be019657.1787739122.git.pabeni@redhat.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Non-blocking MPTCP Fastopen bypasses `mptcp_connect`, leaving the socket permanently in `TCP_CLOSE` and failing to enable the RTX timer.
--

commit 4679eada053d3ad7385facbcb9d12c98ccd146f2
Author: Paolo Abeni <pabeni@redhat.com>
Subject: Squash-to: "mptcp: do not reschedule the RTX timer for fallback sockets"

This commit replaces the MPTCP_RTX_DISABLED flag with MPTCP_RTX_ENABLED to
explicitly control the retransmit timer status across the socket lifecycle.
It sets the enabled flag during active connect and passive initialization.

> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 2f17c5daa704e..a28a0506d28da 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c

[ ... ]

> @@ -4154,6 +4155,7 @@ static int mptcp_connect(struct sock *sk, struct sockaddr_unsized *uaddr,
>  		return PTR_ERR(ssk);
>  
>  	mptcp_set_state(sk, TCP_SYN_SENT);
> +	set_bit(MPTCP_RTX_ENABLED, &msk->flags);

[Severity: High]
Does this change leave the RTX timer disabled during non-blocking Fastopen
connections?

When a non-blocking TCP Fast Open connection is initiated on an MPTCP socket
(using MSG_FASTOPEN and MSG_DONTWAIT), mptcp_sendmsg_fastopen() skips the call
to __inet_stream_connect(), which bypasses mptcp_connect() entirely:

net/mptcp/protocol.c:mptcp_sendmsg_fastopen() {
    ...
	if (ret == -EINPROGRESS && !(msg->msg_flags & MSG_DONTWAIT)) {
		ret = __inet_stream_connect(sk->sk_socket, msg->msg_name,
					    msg->msg_namelen, msg->msg_flags, 1);
    ...
}

Because mptcp_connect() is bypassed, MPTCP_RTX_ENABLED is never set, and the
socket state remains TCP_CLOSE instead of TCP_SYN_SENT.

This causes __mptcp_sync_state() to skip transitioning the socket to
TCP_ESTABLISHED:

net/mptcp/subflow.c:__mptcp_sync_state() {
    ...
	if (sk->sk_state == TCP_SYN_SENT) {
		/* subflow->idsn is always available is TCP_SYN_SENT state,
		 * even for the FASTOPEN scenarios
		 */
    ...
}

Will this cause non-blocking Fastopen connections to become permanently stuck
in TCP_CLOSE without an active retransmit timer if packet loss occurs?

>  	subflow = mptcp_subflow_ctx(ssk);
>  #ifdef CONFIG_TCP_MD5SIG
>  	/* no MPTCP if MD5SIG is enabled on this socket or we may run out of

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/f1e8ffe44c3756195391a25ecf60e56e02e0f34f.1787739122.git.pabeni@redhat.com?part=2

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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 10:13 [PATCH mptcp-net 1/2] mptcp: prevent race between disconnect() and rtx Paolo Abeni
2026-08-26 10:13 ` [PATCH mptcp-net 2/2] Squash-to: "mptcp: do not reschedule the RTX timer for fallback sockets" Paolo Abeni
2026-08-26 10:30   ` sashiko-bot [this message]
2026-08-26 14:35     ` Paolo Abeni
2026-08-26 11:40   ` MPTCP CI
2026-08-26 12:38   ` Matthieu Baerts
2026-08-26 14:38     ` Paolo Abeni
2026-08-26 17:47       ` 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=20260826103038.1CE861F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=sashiko-reviews@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.