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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <521207d1-4537-fda9-ca03-4f952b505d03@st.com>
Date:   Fri, 6 Dec 2019 09:19:15 +0100
From:   Amelie DELAUNAY <amelie.delaunay@...com>
To:     Chuhong Yuan <hslester96@...il.com>
CC:     <linux-rtc@...r.kernel.org>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Alexandre Torgue <alexandre.torgue@...com>,
        <linux-kernel@...r.kernel.org>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] rtc: stm32: add missed clk_disable_unprepare in error
 path of resume

On 12/5/19 5:06 PM, Chuhong Yuan wrote:
> The resume() forgets to call clk_disable_unprepare() when failed.
> Add the missed call to fix it.
> 
> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> ---
>   drivers/rtc/rtc-stm32.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c
> index 781cabb2afca..d774aa18f57a 100644
> --- a/drivers/rtc/rtc-stm32.c
> +++ b/drivers/rtc/rtc-stm32.c
> @@ -897,8 +897,11 @@ static int stm32_rtc_resume(struct device *dev)
>   	}
>   
>   	ret = stm32_rtc_wait_sync(rtc);
> -	if (ret < 0)
> +	if (ret < 0) {
> +		if (rtc->data->has_pclk)
> +			clk_disable_unprepare(rtc->pclk);
>   		return ret;
> +	}
>   
>   	if (device_may_wakeup(dev))
>   		return disable_irq_wake(rtc->irq_alarm);
> 

Reviewed-by: Amelie Delaunay <amelie.delaunay@...com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ