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 5FE852BD0B for ; Sun, 1 Mar 2026 01:21:13 +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=1772328073; cv=none; b=f/9gggTnOy/03vEVun0X2W3MTblxmGQR5OgtcgKnzul7wpaZ6K/cDJiB1P+Q1osZTEgXfoxhZeUDiKsBGK5/SxoSlaY+CNqQAiYnxM1VObPevgkcuFyB0Fc07ojRjvwBrs18RGJY17kovJ/VqnwdA7zzQunQrN0zy4+xutbgGrU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772328073; c=relaxed/simple; bh=neGYlF7Dn+X15J0htypSy/mxR24Nnh56Nug/mpqkE8Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Cn1SlCyT4dX+bXBPUcnOGJ3wnF1MdCZO2s6InC/ANNN94BeXDZy+fXA3TpOo9XsOEhN2epBp/FRLZ9QtvWQ9/q0zUm4yZn6FA6cyQoTwB/y5W4gjJxJ6Sr4XFVhu8peP+tKLZrh+5+SIK6v2JysI4amnAdQnvyK7KD9fJUVOXug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IYu8GAZ0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IYu8GAZ0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5CFBC19421; Sun, 1 Mar 2026 01:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772328073; bh=neGYlF7Dn+X15J0htypSy/mxR24Nnh56Nug/mpqkE8Y=; h=From:To:Cc:Subject:Date:From; b=IYu8GAZ0QlgugNFGSjg7dz0Ezvps/cKrgvJuVzkUG3k3U/zWmRqWXhp476B/koEpx CsyFQyCFKE6OtXJUgPCTyOgaU+EV4reOaU3VeNlZqyuLpK1KFU3DezwcDhEkTE5ZXh JaIkyD8hNTzfHGkJ0WUdRk8rfDXtqijVxuMEw9/rCsph1AeAjDh7UqMBxuyDxpO1ai EiBOkTRwkugdNQ990PbLZFHeU9m9LaoIdw/jtkKhDBL17jhLHVm+CI+ZXo+3n/rqia GADb7fWipjorxZr3hBUC/eDwojP3W3iuylEfkyz8PRMVJPrEMvGMRzAqd18FspOMsw 5/4CKrNc4/hTw== From: Sasha Levin To: stable@vger.kernel.org, vulab@iscas.ac.cn Cc: Nishanth Menon , linux-arm-kernel@lists.infradead.org Subject: FAILED: Patch "soc: ti: pruss: Fix double free in pruss_clk_mux_setup()" failed to apply to 6.12-stable tree Date: Sat, 28 Feb 2026 20:21:11 -0500 Message-ID: <20260301012111.1677038-1-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-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 . Thanks, Sasha ------------------ original commit in Linus's tree ------------------ >From 80db65d4acfb9ff12d00172aed39ea8b98261aad Mon Sep 17 00:00:00 2001 From: Wentao Liang Date: Tue, 13 Jan 2026 01:47:16 +0000 Subject: [PATCH] soc: ti: pruss: Fix double free in pruss_clk_mux_setup() In the pruss_clk_mux_setup(), the devm_add_action_or_reset() indirectly calls pruss_of_free_clk_provider(), which calls of_node_put(clk_mux_np) on the error path. However, after the devm_add_action_or_reset() returns, the of_node_put(clk_mux_np) is called again, causing a double free. Fix by returning directly, to avoid the duplicate of_node_put(). Fixes: ba59c9b43c86 ("soc: ti: pruss: support CORECLK_MUX and IEPCLK_MUX") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang Link: https://patch.msgid.link/20260113014716.2464741-1-vulab@iscas.ac.cn Signed-off-by: Nishanth Menon --- drivers/soc/ti/pruss.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/soc/ti/pruss.c b/drivers/soc/ti/pruss.c index 038576805bfa0..0fd59c73f585d 100644 --- a/drivers/soc/ti/pruss.c +++ b/drivers/soc/ti/pruss.c @@ -366,12 +366,10 @@ static int pruss_clk_mux_setup(struct pruss *pruss, struct clk *clk_mux, ret = devm_add_action_or_reset(dev, pruss_of_free_clk_provider, clk_mux_np); - if (ret) { + if (ret) dev_err(dev, "failed to add clkmux free action %d", ret); - goto put_clk_mux_np; - } - return 0; + return ret; put_clk_mux_np: of_node_put(clk_mux_np); -- 2.51.0