From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 464CA34026B for ; Tue, 3 Feb 2026 12:47:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770122842; cv=none; b=YdH1iCKm84uhBDa5vp403xJbZMSlrNTYl+2Kd4hzqFfFpXRCuqDlfRSlf/mRxPDG+PZJoUjdrQMQ9+XQx8/k7l1zWAf0qKMgGdaU6CwXXMmywHxeZzhPyv8GIapjxZTshJ9z0yRrmcOj4M/YQ303Q3YHkOuOGPob2x9L7+k6mL4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770122842; c=relaxed/simple; bh=27gH+5GbkBTk0vvcYevVtA/Iilf+0l+QdCJH/xm55Ug=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=iYD0Huf18oDLjO13wTuXQylceEq7hHxrVUIZchl+Jw2VmKr3bidBoS00lqQzedh8Lo3dCVlejh8QS47OMI80bPUE6uH18fNRhUf1PCIljlmxSLTqMejy5ijAQFbGV3GSbGsQrTtiaGjL/xQas3DAX9+p6K5E3fWjZtmlAEVPFrk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Azoh1vIj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Azoh1vIj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95900C116D0; Tue, 3 Feb 2026 12:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770122842; bh=27gH+5GbkBTk0vvcYevVtA/Iilf+0l+QdCJH/xm55Ug=; h=Subject:To:Cc:From:Date:From; b=Azoh1vIjXKU6JCeoGoR7BCws3+9oDd1N7if9VUWv4Qw2hON2y3l4KGdwmnle1JZCt Ms9HuxvKOoB65apbFyvqUzNklx7yluMFKtrK4TukAR5qWOVw39JgPRx64rLFEyYiEW gL/9xYS16fGor+Wx2ujh8u+dEzN40fP6KBBwEBfo= Subject: FAILED: patch "[PATCH] mptcp: avoid dup SUB_CLOSED events after disconnect" failed to apply to 6.1-stable tree To: matttbe@kernel.org,geliang@kernel.org,kuba@kernel.org,marco.angaroni@italtel.com Cc: From: Date: Tue, 03 Feb 2026 13:47:01 +0100 Message-ID: <2026020301-obscurity-amazingly-b0be@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x 280d654324e33f8e6e3641f76764694c7b64c5db # git commit -s git send-email --to '' --in-reply-to '2026020301-obscurity-amazingly-b0be@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 280d654324e33f8e6e3641f76764694c7b64c5db Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" Date: Tue, 27 Jan 2026 20:27:23 +0100 Subject: [PATCH] mptcp: avoid dup SUB_CLOSED events after disconnect In case of subflow disconnect(), which can also happen with the first subflow in case of errors like timeout or reset, mptcp_subflow_ctx_reset will reset most fields from the mptcp_subflow_context structure, including close_event_done. Then, when another subflow is closed, yet another SUB_CLOSED event for the disconnected initial subflow is sent. Because of the previous reset, there are no source address and destination port. A solution is then to also check the subflow's local id: it shouldn't be negative anyway. Another solution would be not to reset subflow->close_event_done at disconnect time, but when reused. But then, probably the whole reset could be done when being reused. Let's not change this logic, similar to TCP with tcp_disconnect(). Fixes: d82809b6c5f2 ("mptcp: avoid duplicated SUB_CLOSED events") Cc: stable@vger.kernel.org Reported-by: Marco Angaroni Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/603 Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20260127-net-mptcp-dup-nl-events-v1-1-7f71e1bc4feb@kernel.org Signed-off-by: Jakub Kicinski diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index f505b780f713..e32ae594b4ef 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2598,8 +2598,8 @@ void mptcp_close_ssk(struct sock *sk, struct sock *ssk, struct mptcp_sock *msk = mptcp_sk(sk); struct sk_buff *skb; - /* 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;