summaryrefslogtreecommitdiff
path: root/net/mptcp/protocol.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-10-28 15:55:48 -0700
committerJakub Kicinski <kuba@kernel.org>2024-10-28 15:55:48 -0700
commit825199bf2017e4549586f038ede9acec68de883d (patch)
tree797f92f5cfd258a8955d207c9c8e9a18e2840ef0 /net/mptcp/protocol.c
parentfbb26ecc550200afcc15b121218fe7ec29bae219 (diff)
parent46a3282b87b1f9a88534eba59ecf852b2a21289c (diff)
Merge branch 'mptcp-various-small-improvements'
Matthieu Baerts says: ==================== mptcp: various small improvements The following patches are not related to each other. - Patch 1: Avoid sending advertisements on stale subflows, reducing risks on loosing them. - Patch 2: Annotate data-races around subflow->fully_established, using READ/WRITE_ONCE(). - Patch 3: A small clean-up on the PM side, avoiding a bit of duplicated code. - Patch 4: Use "Middlebox interference" MP_TCPRST code in reaction to a packet received without MPTCP options in the middle of a connection. ==================== Link: https://patch.msgid.link/20241021-net-next-mptcp-misc-6-13-v1-0-1ef02746504a@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/protocol.c')
-rw-r--r--net/mptcp/protocol.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 1f5c63eb21f0..e978e05ec8d1 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3139,8 +3139,7 @@ cleanup:
sock_hold(sk);
pr_debug("msk=%p state=%d\n", sk, sk->sk_state);
- if (msk->token)
- mptcp_event(MPTCP_EVENT_CLOSED, msk, NULL, GFP_KERNEL);
+ mptcp_pm_connection_closed(msk);
if (sk->sk_state == TCP_CLOSE) {
__mptcp_destroy_sock(sk);
@@ -3206,8 +3205,7 @@ static int mptcp_disconnect(struct sock *sk, int flags)
mptcp_stop_rtx_timer(sk);
mptcp_stop_tout_timer(sk);
- if (msk->token)
- mptcp_event(MPTCP_EVENT_CLOSED, msk, NULL, GFP_KERNEL);
+ mptcp_pm_connection_closed(msk);
/* msk->subflow is still intact, the following will not free the first
* subflow
@@ -3511,7 +3509,7 @@ static void schedule_3rdack_retransmission(struct sock *ssk)
struct tcp_sock *tp = tcp_sk(ssk);
unsigned long timeout;
- if (mptcp_subflow_ctx(ssk)->fully_established)
+ if (READ_ONCE(mptcp_subflow_ctx(ssk)->fully_established))
return;
/* reschedule with a timeout above RTT, as we must look only for drop */