Skip to content

Commit 56b824e

Browse files
Paolo Abenikuba-moo
authored andcommitted
mptcp: prevent excessive coalescing on receive
Currently the skb size after coalescing is only limited by the skb layout (the skb must not carry frag_list). A single coalesced skb covering several MSS can potentially fill completely the receive buffer. In such a case, the snd win will zero until the receive buffer will be empty again, affecting tput badly. Fixes: 8268ed4 ("mptcp: introduce and use mptcp_try_coalesce()") Cc: stable@vger.kernel.org # please delay 2 weeks after 6.13-final release Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20241230-net-mptcp-rbuf-fixes-v1-3-8608af434ceb@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 551844f commit 56b824e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/mptcp/protocol.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ static bool mptcp_try_coalesce(struct sock *sk, struct sk_buff *to,
136136
int delta;
137137

138138
if (MPTCP_SKB_CB(from)->offset ||
139+
((to->len + from->len) > (sk->sk_rcvbuf >> 3)) ||
139140
!skb_try_coalesce(to, from, &fragstolen, &delta))
140141
return false;
141142

0 commit comments

Comments
 (0)