]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mptcp: fix recvbuffer adjust on sleeping rcvmsg
authorPaolo Abeni <pabeni@redhat.com>
Mon, 30 Dec 2024 18:12:30 +0000 (19:12 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 3 Jan 2025 02:44:03 +0000 (18:44 -0800)
commit449e6912a2522af672e99992e1201a454910864e
treee75e4686c89eac5b5c24cd5822f0e16ce06883ab
parent260466b576bca0081a7d4acecc8e93687aa22d0e
mptcp: fix recvbuffer adjust on sleeping rcvmsg

If the recvmsg() blocks after receiving some data - i.e. due to
SO_RCVLOWAT - the MPTCP code will attempt multiple times to
adjust the receive buffer size, wrongly accounting every time the
cumulative of received data - instead of accounting only for the
delta.

Address the issue moving mptcp_rcv_space_adjust just after the
data reception and passing it only the just received bytes.

This also removes an unneeded difference between the TCP and MPTCP
RX code path implementation.

Fixes: 581302298524 ("mptcp: error out earlier on disconnect")
Cc: stable@vger.kernel.org
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-1-8608af434ceb@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.c