diff mbox series

[mptcp-net] Squash-to: "mptcp: handle consistently DSS corruption"

Message ID dfce01586ff42d63cffce0a2ca10149e30ec71fe.1727881810.git.pabeni@redhat.com (mailing list archive)
State Accepted, archived
Commit 0752f9d4d42a094613a30c7ecd5bdfd688a89633
Delegated to: Matthieu Baerts
Headers show
Series [mptcp-net] Squash-to: "mptcp: handle consistently DSS corruption" | expand

Checks

Context Check Description
matttbe/build success Build and static analysis OK
matttbe/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
matttbe/shellcheck success MPTCP selftests files have not been modified
matttbe/KVM_Validation__normal success Success! ✅
matttbe/KVM_Validation__debug success Success! ✅
matttbe/KVM_Validation__btf__only_bpftest_all_ success Success! ✅

Commit Message

Paolo Abeni Oct. 2, 2024, 3:10 p.m. UTC
Instead of re-inventing the wheel, use the flag we already
track to easily check if fallback is allowed.

Note that we could not check conn_list in a reliable way,
as the call side is not under the msk socket lock.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 net/mptcp/protocol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Matthieu Baerts Oct. 2, 2024, 3:15 p.m. UTC | #1
Hi Paolo,

On 02/10/2024 17:10, Paolo Abeni wrote:
> Instead of re-inventing the wheel, use the flag we already
> track to easily check if fallback is allowed.

Funny, I was going to react on that too :-)

I was looking at another issue with Christoph where a fallback is not
done, but a RST is done instead. I will try to open a ticket on GitHub
before the weekly meeting today (I don't know if you can join).

I will wait for the CI to test this before applying it.

Cheers,
Matt
MPTCP CI Oct. 2, 2024, 4:15 p.m. UTC | #2
Hi Paolo,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Success! ✅
- KVM Validation: btf (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/11146671727

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/878435d35384
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=894880


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
Matthieu Baerts Oct. 7, 2024, 9:12 a.m. UTC | #3
Hi Paolo,

On 02/10/2024 17:10, Paolo Abeni wrote:
> Instead of re-inventing the wheel, use the flag we already
> track to easily check if fallback is allowed.
> 
> Note that we could not check conn_list in a reliable way,
> as the call side is not under the msk socket lock.
Thank you for the fix!

Now in our tree:

New patches for t/upstream-net and t/upstream:
- 0752f9d4d42a: "squashed" in "mptcp: handle consistently DSS corruption"
- Results: 0a6d0fb8fae4..98b1e473ae39 (export-net)
- Results: 624ef948c8bd..48a08655247c (export)

Tests are now in progress:

- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/3faf828e7f45c82863516b4c157433c1c343349e/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/b4046d581b70c4a32d20a1a582db9a6d256a6849/checks

Cheers,
Matt
diff mbox series

Patch

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index ba5f4f44f4b3..fd1c2e866e8e 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -622,7 +622,7 @@  static bool mptcp_check_data_fin(struct sock *sk)
 
 static void mptcp_dss_corruption(struct mptcp_sock *msk, struct sock *ssk)
 {
-	if (list_is_singular(&msk->conn_list) && msk->first == ssk) {
+	if (READ_ONCE(msk->allow_infinite_fallback)) {
 		MPTCP_INC_STATS(sock_net(ssk),
 				MPTCP_MIB_DSSCORRUPTIONFALLBACK);
 		mptcp_do_fallback(ssk);