]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mptcp: move the whole rx path under msk socket lock protection
authorPaolo Abeni <pabeni@redhat.com>
Tue, 18 Feb 2025 18:36:14 +0000 (19:36 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Feb 2025 03:05:28 +0000 (19:05 -0800)
commitbc68b0efa1bf923cef1294a631d8e7416c7e06e4
tree10b11892c5f0e98e48e9e55cdf26ee7f809431a0
parentf03afb3aeb9d81f6c5ab728a61a040012923e3b3
mptcp: move the whole rx path under msk socket lock protection

After commit c2e6048fa1cf ("mptcp: fix race in release_cb") we can
move the whole MPTCP rx path under the socket lock leveraging the
release_cb.

We can drop a bunch of spin_lock pairs in the receive functions, use
a single receive queue and invoke __mptcp_move_skbs only when subflows
ask for it.

This will allow more cleanup in the next patch.

Some changes are worth specific mention:

The msk rcvbuf update now always happens under both the msk and the
subflow socket lock: we can drop a bunch of ONCE annotation and
consolidate the checks.

When the skbs move is delayed at msk release callback time, even the
msk rcvbuf update is delayed; additionally take care of such action in
__mptcp_move_skbs().

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/20250218-net-next-mptcp-rx-path-refactor-v1-3-4a47d90d7998@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/fastopen.c
net/mptcp/protocol.c
net/mptcp/protocol.h