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 resend mptcp-net 4/4] mptcp: do not reschedule the RTX timer for fallback sockets
Date: Fri, 14 Aug 2026 14:03:33 +0000	[thread overview]
Message-ID: <20260814140334.39D5B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <59c6c4dd41bb72b7aef984b14a0c6ad0881f6a4c.1786713351.git.pabeni@redhat.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The MPTCP_RTX_DISABLED flag makes the TCP_CLOSE state sticky for the RTX timer, permanently disabling retransmissions on reused connections and their accepted children.
--

--- Patch [4]: [PATCH resend mptcp-net 4/4] mptcp: do not reschedule the RTX timer for fallback sockets ---
commit 227375cb381dd3864273cd7170dd28e0f079ff8b
Author: Paolo Abeni <pabeni@redhat.com>

mptcp: do not reschedule the RTX timer for fallback sockets
    
This patch introduces the MPTCP_RTX_DISABLED flag to prevent the RTX timer
from being rescheduled on fallback sockets and when the socket state is
TCP_CLOSE.

> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index b311fe30c7855..f22d64ab1c53b 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
[ ... ]
> @@ -1121,13 +1122,14 @@ static bool mptcp_rtx_timer_pending(struct sock *sk)
>  
>  static void mptcp_reset_rtx_timer(struct sock *sk)
>  {
> +	struct mptcp_sock *msk = mptcp_sk(sk);
>  	unsigned long tout;
>  
> -	/* prevent rescheduling on close */
> -	if (unlikely(inet_sk_state_load(sk) == TCP_CLOSE))
> +	/* Prevent rescheduling on close and in case of fallback. */
> +	if (test_bit(MPTCP_RTX_DISABLED, &msk->flags))
>  		return;

[Severity: High]
Since this flag is checked here to prevent rescheduling, will the timer be
permanently disabled if the flag is never cleared?

[ ... ]
> @@ -3360,6 +3362,9 @@ void mptcp_set_state(struct sock *sk, int state)
>  		 * transition from TCP_SYN_RECV to TCP_CLOSE_WAIT.
>  		 */
>  		break;
> +	case TCP_CLOSE:
> +		set_bit(MPTCP_RTX_DISABLED, &mptcp_sk(sk)->flags);
> +		fallthrough;
>  	default:

[Severity: High]
Does setting MPTCP_RTX_DISABLED here without a corresponding clear logic make
the TCP_CLOSE state sticky for the RTX timer? 

If an MPTCP socket transitions to TCP_CLOSE (like a failed connect() attempt
or an explicit disconnect()), and the application then reuses the socket to 
connect() again, it appears the flag will remain set.

Furthermore, if listen() is called on such a reused socket, would
sk_clone_lock() copy the flags to all child sockets? This could cause every
accepted connection to inherit the MPTCP_RTX_DISABLED flag, permanently
breaking MPTCP-level retransmissions for all clients.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1786713351.git.pabeni@redhat.com?part=4

  reply	other threads:[~2026-08-14 14:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 13:38 [PATCH resend mptcp-net 0/4] mptcp: a few fixes Paolo Abeni
2026-08-14 13:38 ` [PATCH resend mptcp-net 1/4] mptcp: being below memory limit is a likely() condition Paolo Abeni
2026-08-14 13:38 ` [PATCH resend mptcp-net 2/4] mptcp: avoid pruning for OoW data Paolo Abeni
2026-08-14 13:38 ` [PATCH resend mptcp-net 3/4] mptcp: remove unneeded READ_ONCE() annotation Paolo Abeni
2026-08-14 13:38 ` [PATCH resend mptcp-net 4/4] mptcp: do not reschedule the RTX timer for fallback sockets Paolo Abeni
2026-08-14 14:03   ` sashiko-bot [this message]
2026-08-14 16:33     ` Paolo Abeni
2026-08-14 14:59 ` [PATCH resend mptcp-net 0/4] mptcp: a few fixes 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=20260814140334.39D5B1F000E9@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.