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: <1906533a-e86a-10fe-5bc3-4600af98d579@arm.com>
Date:   Wed, 7 Apr 2021 16:56:00 +0100
From:   Lukasz Luba <lukasz.luba@....com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
Cc:     linux-pm@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] memory: samsung: exynos5422-dmc: handle clk_set_parent()
 failure

Hi Krzysztof,

On 4/7/21 4:45 PM, Krzysztof Kozlowski wrote:
> clk_set_parent() can fail and ignoring such case could lead to invalid
> clock setup for given frequency.
> 
> Addresses-Coverity: Unchecked return value
> Fixes: 6e7674c3c6df ("memory: Add DMC driver for Exynos5422")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
> ---
>   drivers/memory/samsung/exynos5422-dmc.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c
> index 56f6e65d40cd..9c8318923ed0 100644
> --- a/drivers/memory/samsung/exynos5422-dmc.c
> +++ b/drivers/memory/samsung/exynos5422-dmc.c
> @@ -1293,7 +1293,9 @@ static int exynos5_dmc_init_clks(struct exynos5_dmc *dmc)
>   
>   	dmc->curr_volt = target_volt;
>   
> -	clk_set_parent(dmc->mout_mx_mspll_ccore, dmc->mout_spll);
> +	ret = clk_set_parent(dmc->mout_mx_mspll_ccore, dmc->mout_spll);
> +	if (ret)
> +		return ret;
>   
>   	clk_prepare_enable(dmc->fout_bpll);
>   	clk_prepare_enable(dmc->mout_bpll);
> 

Thanks for running these tests and for the patch.
I've checked how many many places this function is used in the kernel
and return is ignored - in a lot of places...

This patch LGTM.

Reviewed-by: Lukasz Luba <lukasz.luba@....com>

Regards,
Lukasz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ