mptcp: factor out __mptcp_close() without socket lock
authorMenglong Dong <imagedong@tencent.com>
Tue, 27 Sep 2022 19:31:57 +0000 (12:31 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Sep 2022 02:05:21 +0000 (19:05 -0700)
commit26d3e21ce1aab6cb19069c510fac8e7474445b18
tree6c17560f92ea8d98d1bd6722ded76537c43678ab
parent3e1308a7c88ba149baa08ddffedee30c6b3224a0
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>
net/mptcp/protocol.c
net/mptcp/protocol.h