diff options
author | Menglong Dong <imagedong@tencent.com> | 2022-09-27 21:31:57 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-09-29 04:05:21 +0200 |
commit | 26d3e21ce1aab6cb19069c510fac8e7474445b18 (patch) | |
tree | 6c17560f92ea8d98d1bd6722ded76537c43678ab /net/mptcp/protocol.h | |
parent | Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/... (diff) | |
download | linux-26d3e21ce1aab6cb19069c510fac8e7474445b18.tar.xz linux-26d3e21ce1aab6cb19069c510fac8e7474445b18.zip |
mptcp: factor out __mptcp_close() without socket lock
Factor out __mptcp_close() from mptcp_close(). The caller of
__mptcp_close() should hold the socket lock, and cancel mptcp work when
__mptcp_close() returns true.
This function will be used in the next commit.
Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")
Fixes: 6aeed9045071 ("mptcp: fix race on unaccepted mptcp sockets")
Cc: stable@vger.kernel.org
Reviewed-by: Jiang Biao <benbjiang@tencent.com>
Reviewed-by: Mengen Sun <mengensun@tencent.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/protocol.h')
-rw-r--r-- | net/mptcp/protocol.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 132d50833df1..8f123d450c76 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -612,6 +612,7 @@ void mptcp_subflow_reset(struct sock *ssk); void mptcp_subflow_queue_clean(struct sock *ssk); void mptcp_sock_graft(struct sock *sk, struct socket *parent); struct socket *__mptcp_nmpc_socket(const struct mptcp_sock *msk); +bool __mptcp_close(struct sock *sk, long timeout); bool mptcp_addresses_equal(const struct mptcp_addr_info *a, const struct mptcp_addr_info *b, bool use_port); |