From b29fcfb54cd70caca5b11c80d8d238854938884a Mon Sep 17 00:00:00 2001 From: Paolo Abeni Date: Thu, 6 Jan 2022 16:20:16 -0800 Subject: mptcp: full disconnect implementation The current mptcp_disconnect() implementation lacks several steps, we additionally need to reset the msk socket state and flush the subflow list. Factor out the needed helper to avoid code duplication. Additionally ensure that the initial subflow is disposed only after mptcp_close(), just reset it at disconnect time. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller --- net/mptcp/token.c | 1 + 1 file changed, 1 insertion(+) (limited to 'net/mptcp/token.c') diff --git a/net/mptcp/token.c b/net/mptcp/token.c index e581b341c5be..f52ee7b26aed 100644 --- a/net/mptcp/token.c +++ b/net/mptcp/token.c @@ -384,6 +384,7 @@ void mptcp_token_destroy(struct mptcp_sock *msk) bucket->chain_len--; } spin_unlock_bh(&bucket->lock); + WRITE_ONCE(msk->token, 0); } void __init mptcp_token_init(void) -- cgit v1.2.3-70-g09d2