mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Hongling Zeng <zenghongling@kylinos.cn>
Cc: vkoul@kernel.org, neil.armstrong@linaro.org, johan@kernel.org,
	 kishon@kernel.org, rogerq@ti.com, linux-phy@lists.infradead.org,
	 linux-kernel@vger.kernel.org, zhongling0719@126.com,
	stable@vger.kernel.org
Subject: Re: [PATCH v8 4/4] phy: ti-pipe3: Fix clock leaks in init/exit error paths
Date: Mon, 12 Oct 2026 18:35:01 +0530	[thread overview]
Message-ID: <aszZ1jXVI6Fcq0VJ@debian> (raw)
In-Reply-To: <20260909122630.1313205-5-zenghongling@kylinos.cn>

On Wed, Sep 09, 2026 at 08:26:30PM +0800, Hongling Zeng wrote:
> Two paths return without disabling the clocks that ti_pipe3_init()
> has just enabled, leaking clock enable references:
> 
> 1. In ti_pipe3_init(), when regmap_update_bits() fails for PCIe mode,
>    the function returns the error without calling
>    ti_pipe3_disable_clocks(). The clocks stay permanently enabled
>    since the PHY framework won't invoke the .exit callback on init
>    failure.
> 
> 2. In ti_pipe3_exit(), when the PHY is in SATA mode without
>    dpll_reset_syscon, the function returns 0 early to avoid powering
>    down the SATA DPLL (Errata i783), which also skips the
>    ti_pipe3_disable_clocks() at the end of the function. Every
>    init/exit cycle therefore leaks the clock enable reference taken
>    in ti_pipe3_init().
> 
> Fix both by adding the missing ti_pipe3_disable_clocks() calls,
> consistent with how the DPLL program error path handles cleanup.
> 
> Fixes: 234738ea3390 ("phy: ti-pipe3: move clk initialization to a separate function")
> Fixes: 0a0830feb2ad ("phy: ti-pipe3: fix suspend")
> Cc: stable@vger.kernel.org

This is not really a stable candidate...

> Reported-by: Sashiko AI <sashiko@kernel.org>
> Closes: https://lore.kernel.org/all/20260518023657.41852C2BCB0@smtp.kernel.org/
> Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

- Mani

-- 
மணிவண்ணன் சதாசிவம்

      reply	other threads:[~2026-10-12 13:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09 12:26 [PATCH v8 0/4] phy: ti-pipe3: Fix clock resource handling issues Hongling Zeng
2026-09-09 12:26 ` [PATCH v8 1/4] phy: ti-pipe3: Fix ignored clock enable return value in init Hongling Zeng
2026-09-09 12:26 ` [PATCH v8 2/4] phy: ti: pipe3: Fix clock resource leak on probe errors Hongling Zeng
2026-10-12 12:56   ` Manivannan Sadhasivam
2026-09-09 12:26 ` [PATCH v8 3/4] phy: ti-pipe3: Fix EPROBE_DEFER handling for clock resources Hongling Zeng
2026-10-12 12:59   ` Manivannan Sadhasivam
2026-09-09 12:26 ` [PATCH v8 4/4] phy: ti-pipe3: Fix clock leaks in init/exit error paths Hongling Zeng
2026-10-12 13:05   ` Manivannan Sadhasivam [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aszZ1jXVI6Fcq0VJ@debian \
    --to=mani@kernel.org \
    --cc=johan@kernel.org \
    --cc=kishon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rogerq@ti.com \
    --cc=stable@vger.kernel.org \
    --cc=vkoul@kernel.org \
    --cc=zenghongling@kylinos.cn \
    --cc=zhongling0719@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®