]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mptcp: drop bogus optimization in __mptcp_check_push()
authorPaolo Abeni <pabeni@redhat.com>
Tue, 28 Oct 2025 08:16:52 +0000 (09:16 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Oct 2025 00:44:28 +0000 (17:44 -0700)
commit27b0e701d3872ba59c5b579a9e8a02ea49ad3d3b
tree7180da13eeb06ec6212a8c3a941a99725211cdc2
parent00764aa5c9bbb2044eb04d6d78584a436666b231
mptcp: drop bogus optimization in __mptcp_check_push()

Accessing the transmit queue without owning the msk socket lock is
inherently racy, hence __mptcp_check_push() could actually quit early
even when there is pending data.

That in turn could cause unexpected tx lock and timeout.

Dropping the early check avoids the race, implicitly relaying on later
tests under the relevant lock. With such change, all the other
mptcp_send_head() call sites are now under the msk socket lock and we
can additionally drop the now unneeded annotation on the transmit head
pointer accesses.

Fixes: 6e628cd3a8f7 ("mptcp: use mptcp release_cb for delayed tasks")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Geliang Tang <geliang@kernel.org>
Tested-by: Geliang Tang <geliang@kernel.org>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20251028-net-mptcp-send-timeout-v1-1-38ffff5a9ec8@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.c
net/mptcp/protocol.h