mptcp: better msk-level shutdown.
authorPaolo Abeni <pabeni@redhat.com>
Tue, 12 Jan 2021 17:25:24 +0000 (18:25 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Jan 2021 04:09:19 +0000 (20:09 -0800)
commit76e2a55d16259b51116767b28b19d759bff43f72
tree58414f66c38aa154beaf29ddee24bb3414a70900
parent20bc80b6f582ad1151c52ca09ab66b472768c9c8
mptcp: better msk-level shutdown.

Instead of re-implementing most of inet_shutdown, re-use
such helper, and implement the MPTCP-specific bits at the
'proto' level.

The msk-level disconnect() can now be invoked, lets provide a
suitable implementation.

As a side effect, this fixes bad state management for listener
sockets. The latter could lead to division by 0 oops since
commit ea4ca586b16f ("mptcp: refine MPTCP-level ack scheduling").

Fixes: 43b54c6ee382 ("mptcp: Use full MPTCP-level disconnect state machine")
Fixes: ea4ca586b16f ("mptcp: refine MPTCP-level ack scheduling")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.c