lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 4 Dec 2019 10:39:47 +0200
From:   Roger Quadros <rogerq@...com>
To:     Chuhong Yuan <hslester96@...il.com>
CC:     Kishon Vijay Abraham I <kishon@...com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] phy: ti-pipe3: fix missed clk_disable_unprepare in remove

Hi Chuhong,

On 04/12/2019 09:25, Chuhong Yuan wrote:
> The driver calls clk_prepare_enable in probe but forgets to call
> clk_disable_unprepare in remove.
> Add the missed call to fix it.
> 
> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> ---
>   drivers/phy/ti/phy-ti-pipe3.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
> index edd6859afba8..19fd1005a440 100644
> --- a/drivers/phy/ti/phy-ti-pipe3.c
> +++ b/drivers/phy/ti/phy-ti-pipe3.c
> @@ -850,6 +850,12 @@ static int ti_pipe3_probe(struct platform_device *pdev)
>   
>   static int ti_pipe3_remove(struct platform_device *pdev)
>   {
> +	struct ti_pipe3 *phy = platform_get_drvdata(pdev);
> +
> +	if (phy->mode == PIPE3_MODE_SATA) {
> +		clk_disable_unprepare(phy->refclk);
> +		phy->sata_refclk_enabled = false;
> +	}

In fact we are doing an additional disable in ti_pipe3_disable_clocks()
for SATA case.

I think that piece of code should removed if you implement it in
ti_pipe3_remove().
Also commit log should be updated accordingly.

>   	pm_runtime_disable(&pdev->dev);
>   
>   	return 0;
> 

-- 
cheers,
-roger
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ