]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit538c9914f7ff5817cc9ebd66005b15fbc22205e0
tree6c17560f92ea8d98d1bd6722ded76537c43678ab
parentbe60e1172363f961ed1ca62d0564ba5d7047a9d1
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: fb5f5519370c ("mptcp: Add handling of incoming MP_JOIN requests")
Fixes: 4eeba793cd3f ("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