mptcp: subflows garbage collection
authorPaolo Abeni <pabeni@redhat.com>
Fri, 9 Oct 2020 17:00:01 +0000 (19:00 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 10 Oct 2020 18:04:53 +0000 (11:04 -0700)
commit0e4f35d7880157ceccf0a58377d778b02762af82
tree6160e37cd56d5a28940c4e18f00eade5f9489fc0
parentd582484726c4c46c8580923e855665fb91e3463e
mptcp: subflows garbage collection

The msk can close MP_JOIN subflows if the initial handshake
fails. Currently such subflows are kept alive in the
conn_list until the msk itself is closed.

Beyond the wasted memory, we could end-up sending the
DATA_FIN and the DATA_FIN ack on such socket, even after a
reset.

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