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 19BE43B1015 for ; Tue, 12 May 2026 14:21:42 +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=1778595702; cv=none; b=saxKic+z8FzzF1dmTBfkFS9rNJWrL9NYdMTnmvLoXgXrNe731inmUe8M1tBoZBTpWJY3O8414GlDp3mIwTsZpZqNvwnaAlZ4OZAgs0pZJ+jmp7LdgnZyonJMj7YZfw26Mh5cobZlgsLvtypANmXP4qEF8sXnRWotxnJtWhrbw24= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778595702; c=relaxed/simple; bh=ST6c93OiZ9gFMCad15LEhHGKBMpe2FV0RjopfjqM0/g=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=ebyT85MPpsFxusPkX17saeFZ/Z/Dbmv1OkUSc6zkc9yOJjpGxVDpn8XQV9asKfZW0xFoINj7aPSGvrPL1+uEQkddOM7AfBg4yp2pSGx4l4MsSQmSL0zoavawkPmkEZNB4rCXNfj5HKXyfF5Y7ZN6Ra5j9mNPpSfdQuAgi4T4ouM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eL5lBAFb; 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="eL5lBAFb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C98AC2BCB0; Tue, 12 May 2026 14:21:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778595701; bh=ST6c93OiZ9gFMCad15LEhHGKBMpe2FV0RjopfjqM0/g=; h=Subject:To:Cc:From:Date:From; b=eL5lBAFb2Vr451a50l4Rm2rO/tUMVnUbe5SxNq57BDmTT+KufQm+Gs7HtqdgkFDph TIIQpSivTwut/Jl/QQTToMlnQ8TqNgLXvOYeGH7S7v1IdApnubrI+GngAAyGSZ3fsa haL8RdZeRhvlXyFQLAu/oF9JHoz/MRtm/+Rdi3So= Subject: FAILED: patch "[PATCH] mptcp: pm: ADD_ADDR rtx: always decrease sk refcount" failed to apply to 5.10-stable tree To: matttbe@kernel.org,kuba@kernel.org,martineau@kernel.org Cc: From: Date: Tue, 12 May 2026 16:21:32 +0200 Message-ID: <2026051232-imbecile-jolly-52df@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 5.10-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-5.10.y git checkout FETCH_HEAD git cherry-pick -x 9634cb35af17019baec21ca648516ce376fa10e6 # git commit -s git send-email --to '' --in-reply-to '2026051232-imbecile-jolly-52df@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 9634cb35af17019baec21ca648516ce376fa10e6 Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" Date: Tue, 5 May 2026 17:00:52 +0200 Subject: [PATCH] mptcp: pm: ADD_ADDR rtx: always decrease sk refcount When an ADD_ADDR is retransmitted, the sk is held in sk_reset_timer(). It should then be released in all cases at the end. Some (unlikely) checks were returning directly instead of calling sock_put() to decrease the refcount. Jump to a new 'exit' label to call __sock_put() (which will become sock_put() in the next commit) to fix this potential leak. While at it, drop the '!msk' check which cannot happen because it is never reset, and explicitly mark the remaining one as "unlikely". Fixes: 00cfd77b9063 ("mptcp: retransmit ADD_ADDR when timeout") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20260505-net-mptcp-pm-fixes-7-1-rc3-v1-4-fca8091060a4@kernel.org Signed-off-by: Jakub Kicinski diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c index 3912128d9b86..2a01bf1b5bfd 100644 --- a/net/mptcp/pm.c +++ b/net/mptcp/pm.c @@ -331,11 +331,8 @@ static void mptcp_pm_add_timer(struct timer_list *timer) pr_debug("msk=%p\n", msk); - if (!msk) - return; - - if (inet_sk_state_load(sk) == TCP_CLOSE) - return; + if (unlikely(inet_sk_state_load(sk) == TCP_CLOSE)) + goto exit; bh_lock_sock(sk); if (sock_owned_by_user(sk)) { @@ -373,6 +370,7 @@ static void mptcp_pm_add_timer(struct timer_list *timer) out: bh_unlock_sock(sk); +exit: __sock_put(sk); }