]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jul 2025 06:58:26 +0000 (08:58 +0200)
commit659da22dee5ff316ba63bdaeeac7b58b5442f6c2
tree704c74b546534168442677505b69142c1a38d42d
parent1d82a8fe6ee4afdc92f4e8808c9dad2a6095bbc5
mptcp: plug races between subflow fail and subflow creation

commit def5b7b2643ebba696fc60ddf675dca13f073486 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mptcp/pm.c
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/subflow.c