From: Mat Martineau <martineau@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-net] mptcp: fix data re-injection from stale subflow
Date: Tue, 23 Jan 2024 17:14:52 -0800 (PST) [thread overview]
Message-ID: <043ea620-cf44-e68c-ef4d-7d5986ec1b12@kernel.org> (raw)
In-Reply-To: <35875ef9cb7194563b580e14c71cc8cb065f846c.1706043786.git.pabeni@redhat.com>
On Tue, 23 Jan 2024, Paolo Abeni wrote:
> When the MPTCP PM detects that a subflow is stale, all the packet
> scheduler must re-inject all the mptcp-level unacked data. To avoid
> acquiring unneeded locks, it first try to check if any unacked data
> is present at all in the RTX queue, but such check is currently
> broken, as it uses TCP-specific helper on an MPTCP socket.
>
> Funnily enough fuzzers and static checkers are happy, as the accessed
> memory still belongs to the mptcp_sock struct, and even from a
> functional perspective the recovery completed successfully, as
> the short-cut test always failed.
>
> A recent unrelated TCP change - commit d5fed5addb2b ("tcp: reorganize
> tcp_sock fast path variables") - exposed the issue, as the tcp field
> reorganization makes the mptcp code always skip the re-inection.
>
> Fix the issue dropping the bogus call: we are on a slow path, the early
> optimization proved once again to be evil.
>
Thanks for tracking this down, Paolo. Fix LGTM:
Reviewed-by: Mat Martineau <martineau@kernel.org>
> Fixes: 1e1d9d6f119c ("mptcp: handle pending data on closed subflow")
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/468
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> net/mptcp/protocol.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 53d6c5544900..a8a94b34a51e 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -2339,9 +2339,6 @@ bool __mptcp_retransmit_pending_data(struct sock *sk)
> if (__mptcp_check_fallback(msk))
> return false;
>
> - if (tcp_rtx_and_write_queues_empty(sk))
> - return false;
> -
> /* the closing socket has some data untransmitted and/or unacked:
> * some data in the mptcp rtx queue has not really xmitted yet.
> * keep it simple and re-inject the whole mptcp level rtx queue
> --
> 2.43.0
>
>
>
next prev parent reply other threads:[~2024-01-24 1:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 21:03 [PATCH mptcp-net] mptcp: fix data re-injection from stale subflow Paolo Abeni
2024-01-23 22:01 ` mptcp: fix data re-injection from stale subflow: Tests Results MPTCP CI
2024-01-23 22:32 ` MPTCP CI
2024-01-24 1:14 ` Mat Martineau [this message]
2024-01-24 2:25 ` MPTCP CI
2024-01-24 2:33 ` MPTCP CI
2024-01-30 11:59 ` [PATCH mptcp-net] mptcp: fix data re-injection from stale subflow Matthieu Baerts
2024-01-30 15:12 ` Paolo Abeni
2024-01-30 17:52 ` Matthieu Baerts
2024-01-30 18:53 ` Paolo Abeni
2024-01-31 11:12 ` 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=043ea620-cf44-e68c-ef4d-7d5986ec1b12@kernel.org \
--to=martineau@kernel.org \
--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.