Recently, Paolo noticed[1] that tcp_done() has been closed on an already
closed socket and this was causing an issue reported by Christoph[2].
To prevent such issues, we can add a WARN in tcp_done() if the state is
already TCP_CLOSE, see patch 2/2.
But before, we need to remove code paths leading to such situations, see
patch 1/2.
[1] https://lore.kernel.org/mptcp/29f3677f2032145ac2b1c1a90ec96ef0d61e4269.1676889558.git.pabeni@redhat.com/
[2] https://github.com/multipath-tcp/mptcp_net-next/issues/357
Link-to: https://github.com/multipath-tcp/mptcp_net-next/issues/362
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
Matthieu Baerts (2):
mptcp: avoid setting TCP_CLOSE state twice
Squash-to: DO-NOT-MERGE: mptcp: use kmalloc on kasan build
net/ipv4/tcp.c | 2 ++
net/mptcp/subflow.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
---
base-commit: dfa25741f79ebcd03e7a69646111ca18d600e562
change-id: 20230221-mptcp-warn-tcp-done-close-e430a246d8d4
Best regards,
--
Matthieu Baerts <matthieu.baerts@tessares.net>