๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
9 messages
9 total messages Started by "Matthieu Baerts (NGI0)" Mon, 16 Nov 2026 22:06
[PATCH net 0/7] mptcp: misc fixes for v7.4-rc4
#17475
Author: "Matthieu Baerts (NGI0)"
Date: Mon, 16 Nov 2026 22:06
43 lines
10099 bytes
Here are some unrelated fixes:

- Patch 1: do not send data beyond the window announced by the peer. A
  fix for v5.11.

- Patch 2: push pending data after a sendmsg copy fault. A fix for v6.1.

- Patches 3-6: with TFO, send the data written by a server before the
  third ACK as soon as this ACK arrives, also in case of fallback to
  TCP, even if the connection was shut down. Fixes for v6.2 and v5.19.

- Patch 7: after a fallback, fix the dummy mapping of overlapping
  segments. A fix for v6.19.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Geliang Tang (1):
      mptcp: fix dummy mapping of overlapping segments

Matthieu Baerts (NGI0) (5):
      mptcp: do not use a raised snd_wnd for the send window
      mptcp: use sk instead of casting msk in check_fully_established()
      mptcp: push queued data on passive TFO subflows becoming established
      mptcp: push queued data on subflows falling back at the handshake
      mptcp: don't send a FIN before the pending data on fallback

Quanye Yang (1):
      mptcp: push pending data after a sendmsg copy fault

 net/mptcp/options.c  | 23 +++++++++++++++++++----
 net/mptcp/protocol.c |  4 +++-
 net/mptcp/protocol.h |  6 +++++-
 net/mptcp/subflow.c  |  2 +-
 4 files changed, 28 insertions(+), 7 deletions(-)
---
base-commit: aa40afa831ebfe45e40a23721711059f2ac584d4
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main
change-id: 20261116-net-mptcp-misc-fixes-7-4-rc4-9dc946f31d92

Best regards,
--  
Matthieu Baerts (NGI0) <matttbe@kernel.org>
[PATCH net 2/7] mptcp: push pending data after a sendmsg copy fault
#17477
Author: "Matthieu Baerts (NGI0)"
Date: Mon, 16 Nov 2026 22:06
51 lines
10012 bytes
From: Quanye Yang <quanyeyang@proton.me>

mptcp_sendmsg() copies into the msk write queue first, then
__mptcp_push_pending() on the success path. tcp_sendmsg_locked()
does the opposite: its do_error path jumps to out, and out
calls tcp_push() when copied > 0.

A later iovec fault (copy_from_iter / -EFAULT) after a successful
iteration therefore returns the partial byte count but leaves the
already-queued dfrag on rtx_queue. No subflow packet is sent, no
retransmission timer is armed, and DATA_FIN stays blocked on
first_pending.

Push in do_error when copied is already non-zero. Do not move
the push to out: copied is a size_t, and sk_stream_error()
stores a negative errno there.

The issue was spot by Sashiko, but easy to reproduce with Packetdrill:

  writev(4, [{..., 32728}, {NULL, 4096}], 2) = 32728

Fixes: 69800e516e96 ("mptcp: propagate fastclose error")
Cc: stable@vger.kernel.org
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/640
Signed-off-by: Quanye Yang <quanyeyang@proton.me>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 net/mptcp/protocol.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 8968db58083e..b67096ee131b 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -2130,8 +2130,10 @@ static int mptcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
 	return copied;
 
 do_error:
-	if (copied)
+	if (copied) {
+		__mptcp_push_pending(sk, msg->msg_flags);
 		goto out;
+	}
 
 	copied = sk_stream_error(sk, msg->msg_flags, ret);
 	goto out;

-- 
2.55.0
[PATCH net 3/7] mptcp: use sk instead of casting msk in check_fully_established()
#17476
Author: "Matthieu Baerts (NGI0)"
Date: Mon, 16 Nov 2026 22:06
47 lines
9883 bytes
The MPTCP socket is cast to a struct sock in check_fully_established(),
to take its data lock. The next commits need it more, to push the
pending data.

Add a local 'sk' variable instead of casting msk each time: no
functional change.

The 'Fixes' tag here below is the same as the one from the next
commits: this patch is needed to fix the issues introduced by this
commit ID.

Fixes: 36b122baf6a8 ("mptcp: add subflow_v(4,6)_send_synack()")
Cc: stable@vger.kernel.org
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 net/mptcp/options.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index a1e65309171e..1c58468b985b 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -982,6 +982,8 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
 				    struct sk_buff *skb,
 				    struct mptcp_options_received *mp_opt)
 {
+	struct sock *sk = (struct sock *)msk;
+
 	/* here we can process OoO, in-window pkts, only in-sequence 4th ack
 	 * will make the subflow fully established
 	 */
@@ -1043,9 +1045,9 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
 	if (mp_opt->deny_join_id0)
 		WRITE_ONCE(msk->pm.remote_deny_join_id0, true);
 
-	mptcp_data_lock((struct sock *)msk);
+	mptcp_data_lock(sk);
 	__mptcp_subflow_fully_established(msk, subflow, mp_opt);
-	mptcp_data_unlock((struct sock *)msk);
+	mptcp_data_unlock(sk);
 
 check_notify:
 	/* if the subflow is not already linked into the conn_list, we can't

-- 
2.55.0
Re: [PATCH net 2/7] mptcp: push pending data after a sendmsg copy fault
#18159
Author: netdev-bot+sashiko
Date: Tue, 17 Nov 2026 22:29
53 lines
9764 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] mptcp: Fixes trailer in commit message cites 69800e516e96 instead
  of d9ca1de8c0cd

--

> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -2130,8 +2130,10 @@ static int mptcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
>  	return copied;
>  
>  do_error:
> -	if (copied)
> +	if (copied) {
> +		__mptcp_push_pending(sk, msg->msg_flags);
>  		goto out;
> +	}
>  
>  	copied = sk_stream_error(sk, msg->msg_flags, ret);
>  	goto out;
>

[Severity: Low]
The Fixes tag looks off to me. Before 69800e516e96 ("mptcp: propagate
fastclose error"), a copy fault in mptcp_sendmsg() already set
ret = -EFAULT and jumped straight to out. The out label sat after the
if (copied) __mptcp_push_pending() block and returned copied ? : ret.

So with copied > 0, the already queued dfrag was left on rtx_queue
without a push even back then. 69800e516e96 only introduced do_error
to pass ret through sk_stream_error() when copied == 0. It kept the
existing if (copied) goto out; behaviour.

As far as I can tell, skipping the push on a partial copy error goes
back to d9ca1de8c0cd ("mptcp: move page frag allocation in
mptcp_sendmsg()"). That commit made mptcp_sendmsg() queue everything
first and only push after the loop.

With the current tag, stable tooling would miss kernels that have
d9ca1de8c0cd but not 69800e516e96.

Could you double check, and if you agree, point the Fixes tag at
d9ca1de8c0cd instead?

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116-net-mptcp-misc-fixes-7-4-rc4-v1-0-bf7656de653e%40kernel.org
Re: [PATCH net 2/7] mptcp: push pending data after a sendmsg copy fault
#18771
Author: Matthieu Baerts
Date: Wed, 18 Nov 2026 22:01
25 lines
11914 bytes
Hello,

On 17/11/2026 23:29, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe
> issue(s) in other patches of this series. This mail is only an FYI, in case
> you want to address the nit picks below when you respin.
> 
> Low priority / nit picks for your consideration:
> 
> - [Low] mptcp: Fixes trailer in commit message cites 69800e516e96 instead
>   of d9ca1de8c0cd

Correct, before 69800e516e96, the push was already skipped after a
partial copy. The right tag is:

Fixes: d9ca1de8c0cd ("mptcp: move page frag allocation in mptcp_sendmsg()")

Do I need to send a v2 for that? If yes, can we please just drop this
patch?

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH net 0/7] mptcp: misc fixes for v7.4-rc4
#18776
Author: Matthieu Baerts
Date: Wed, 18 Nov 2026 22:05
30 lines
12391 bytes
Hi Jakub, Paolo,

On 16/11/2026 23:06, Matthieu Baerts (NGI0) wrote:
> Here are some unrelated fixes:
> 
> - Patch 1: do not send data beyond the window announced by the peer. A
>   fix for v5.11.
> 
> - Patch 2: push pending data after a sendmsg copy fault. A fix for v6.1.
> 
> - Patches 3-6: with TFO, send the data written by a server before the
>   third ACK as soon as this ACK arrives, also in case of fallback to
>   TCP, even if the connection was shut down. Fixes for v6.2 and v5.19.
> 
> - Patch 7: after a fallback, fix the dummy mapping of overlapping
>   segments. A fix for v6.19.

TL;DR regarding the AI reviews: they are not blocking (to me): all "Low"
except on patch 6, but that's pre-existing and not a regression.

Note that patch 2 should have another Fixes tag (sent in my reply to
Clashiko). Sorry for that, Sashiko/Clashiko didn't notice that before.
If changing it when applying the patches is causing troubles, could you
please drop this patch 2/7 and apply the rest?

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH net 0/7] mptcp: misc fixes for v7.4-rc4
#19558
Author: Jakub Kicinski
Date: Fri, 20 Nov 2026 02:32
8 lines
8412 bytes
On Wed, 18 Nov 2026 23:05:24 +0100 Matthieu Baerts wrote:
> Note that patch 2 should have another Fixes tag (sent in my reply to
> Clashiko). Sorry for that, Sashiko/Clashiko didn't notice that before.
> If changing it when applying the patches is causing troubles, could you
> please drop this patch 2/7 and apply the rest?

Updated the tag when applying. Sorry for missing the PR.
Re: [PATCH net 0/7] mptcp: misc fixes for v7.4-rc4
#19565
Author: patchwork-bot+netdevbpf
Date: Fri, 20 Nov 2026 02:40
36 lines
9479 bytes
Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 16 Nov 2026 23:06:07 +0100 you wrote:
> Here are some unrelated fixes:
> 
> - Patch 1: do not send data beyond the window announced by the peer. A
>   fix for v5.11.
> 
> - Patch 2: push pending data after a sendmsg copy fault. A fix for v6.1.
> 
> [...]

Here is the summary with links:
  - [net,1/7] mptcp: do not use a raised snd_wnd for the send window
    https://git.kernel.org/netdev/net/c/ec7cb74c1a7e
  - [net,2/7] mptcp: push pending data after a sendmsg copy fault
    https://git.kernel.org/netdev/net/c/68f465e3d9ce
  - [net,3/7] mptcp: use sk instead of casting msk in check_fully_established()
    https://git.kernel.org/netdev/net/c/bb6081907c60
  - [net,4/7] mptcp: push queued data on passive TFO subflows becoming established
    https://git.kernel.org/netdev/net/c/d7c650916aa1
  - [net,5/7] mptcp: push queued data on subflows falling back at the handshake
    https://git.kernel.org/netdev/net/c/595b7d49d4f1
  - [net,6/7] mptcp: don't send a FIN before the pending data on fallback
    https://git.kernel.org/netdev/net/c/d0e88ecfae68
  - [net,7/7] mptcp: fix dummy mapping of overlapping segments
    https://git.kernel.org/netdev/net/c/3d064436b287

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Re: [PATCH net 0/7] mptcp: misc fixes for v7.4-rc4
#19701
Author: Matthieu Baerts
Date: Fri, 20 Nov 2026 08:50
19 lines
12034 bytes
Hi Jakub,

On 20/11/2026 03:32, Jakub Kicinski wrote:
> On Wed, 18 Nov 2026 23:05:24 +0100 Matthieu Baerts wrote:
>> Note that patch 2 should have another Fixes tag (sent in my reply to
>> Clashiko). Sorry for that, Sashiko/Clashiko didn't notice that before.
>> If changing it when applying the patches is causing troubles, could you
>> please drop this patch 2/7 and apply the rest?
> 
> Updated the tag when applying. Sorry for missing the PR.

Thank you for having updated the tag and applied the series. No problem,
I saw how long the queue was on Suie yesterday!

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads