diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 3cbef3b176a4..f2bf78c019df 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2591,8 +2591,8 @@ out: void mptcp_close_ssk(struct sock *sk, struct sock *ssk, struct mptcp_subflow_context *subflow) { - /* The first subflow can already be closed and still in the list */ - if (subflow->close_event_done) + /* The first subflow can already be closed or disconnected */ + if (subflow->close_event_done || READ_ONCE(subflow->local_id) < 0) return; subflow->close_event_done = true;