summaryrefslogtreecommitdiff
path: root/net/mptcp/token.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2022-01-07 03:20:16 +0300
committerDavid S. Miller <davem@davemloft.net>2022-01-07 14:27:06 +0300
commitb29fcfb54cd70caca5b11c80d8d238854938884a (patch)
treece6469a982603e3dddbe67c5c3205b961324e437 /net/mptcp/token.c
parentf284c0c7732189fa77567dc061c5f4205c4fa05b (diff)
downloadlinux-b29fcfb54cd70caca5b11c80d8d238854938884a.tar.xz
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 <pabeni@redhat.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/token.c')
-rw-r--r--net/mptcp/token.c1
1 files changed, 1 insertions, 0 deletions
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)