mptcp: handle correctly disconnect() failures
authorPaolo Abeni <pabeni@redhat.com>
Tue, 20 Jun 2023 16:24:18 +0000 (18:24 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 Jun 2023 05:44:54 +0000 (22:44 -0700)
commitc2b2ae3925b65070adb27d5a31a31c376f26dec7
treef7fc3d3bda23abaea001e2c062001da2496d1b13
parent59bb14bda2f86550d10e65c9091ba442a0ac4b45
mptcp: handle correctly disconnect() failures

Currently the mptcp code has assumes that disconnect() can fail only
at mptcp_sendmsg_fastopen() time - to avoid a deadlock scenario - and
don't even bother returning an error code.

Soon mptcp_disconnect() will handle more error conditions: let's track
them explicitly.

As a bonus, explicitly annotate TCP-level disconnect as not failing:
the mptcp code never blocks for event on the subflows.

Fixes: 7d803344fdc3 ("mptcp: fix deadlock in fastopen error path")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Tested-by: Christoph Paasch <cpaasch@apple.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.c