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 4242E277C9D for ; Sun, 1 Mar 2026 01:41:56 +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=1772329316; cv=none; b=dq4P/s28y4llB7PE1ZaoYFNp0rMSa0htatxgmyZMKv39gnKZB6TyvNO1yi4VJfyopGgxG6cV5Tza5h3Bmq1hxfOoCTplq+PJ5vpxgWUi2f8RBfmwaQkbIJ3AMppJgKyHi1Q3wTdwyczCDjPIC4gkYyouRvX9ywmRTRxD3A5qrpc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772329316; c=relaxed/simple; bh=DZgwUkLbSC1Gsk2Cp5BMaa7SvKj5k//iiNKBuBlwVJA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dE9/pm++u6/8b3ujqUTiY+alqOk+cxaa6DioSBodnX/PvX/2QpwJJPbCD2Gk0Nho1Rfqrs9eWRoFfcneN91T8eqH1DwaQIjBT7nUR3bztbq6VaQmV+qTD7BAY7SORL8HjwTTIFggHQ10HUxpP8iPJ6A46extpGt2y1Uq/N2eL24= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Nll+fgC5; 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="Nll+fgC5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3CB6C19421; Sun, 1 Mar 2026 01:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772329316; bh=DZgwUkLbSC1Gsk2Cp5BMaa7SvKj5k//iiNKBuBlwVJA=; h=From:To:Cc:Subject:Date:From; b=Nll+fgC560Sb//QAfgRNhQn9pzKTpAGQdnHALF3swu9ueWX3SlaZzOzg04mgWMJLN lFJDZO+9sDUZHFaFH7u6XwQkqvVVxR8iO3Zbs+bZ6is5aRFdcNJP6mwApVoPQ5qcRd pL2JcfRyfuRuuYX5xALpe+HSfaFyIpzyBE5tn8XvAKMeYHZvRBLfd45GwATEVCWr/w rXrYSaTF01sI+/0k6ptMMPOCfXOZFJsmQ/mk8/bvWr1FmxpBcQ/K2FXlDvErVp2W1A Cc8KwbnKlMdrqfsTQ8D9tk7tbmn7+NbbXW1DmrpcSjZ+pfKn9qVlbkAnmXnH0U4GtD NLkcizf6XAwpg== 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.1-stable tree Date: Sat, 28 Feb 2026 20:41:54 -0500 Message-ID: <20260301014154.1703645-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.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 . 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