]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mptcp: plug races between subflow fail and subflow creation
authorPaolo Abeni <pabeni@redhat.com>
Mon, 14 Jul 2025 16:41:45 +0000 (18:41 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 16 Jul 2025 00:31:25 +0000 (17:31 -0700)
commitdef5b7b2643ebba696fc60ddf675dca13f073486
tree163778f9933f21e1d1dbba27a55ff6a95912a643
parentf8a1d9b18c5efc76784f5a326e905f641f839894
mptcp: plug races between subflow fail and subflow creation

We have races similar to the one addressed by the previous patch between
subflow failing and additional subflow creation. They are just harder to
trigger.

The solution is similar. Use a separate flag to track the condition
'socket state prevent any additional subflow creation' protected by the
fallback lock.

The socket fallback makes such flag true, and also receiving or sending
an MP_FAIL option.

The field 'allow_infinite_fallback' is now always touched under the
relevant lock, we can drop the ONCE annotation on write.

Fixes: 478d770008b0 ("mptcp: send out MP_FAIL when data checksum fails")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250714-net-mptcp-fallback-races-v1-2-391aff963322@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm.c
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/subflow.c