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] [day] [month] [year] [list]
Date:   Thu, 11 Feb 2021 12:30:21 +0100
From:   Michael Tretter <m.tretter@...gutronix.de>
To:     Colin King <colin.king@...onical.com>
Cc:     Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Michal Simek <michal.simek@...inx.com>,
        linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next][V2] soc: xilinx: vcu: fix error check on
 clk_hw_get_parent call

On Thu, 11 Feb 2021 09:57:00 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> Currently the check for failur on the call to clk_hw_get_parent
> is checking for a null return in the divider pointer instead of
> checking the mux pointer. Fix this.
> 
> Thanks to Michael Tretter for suggesting the correct fix.

Thanks!

> 
> Addresses-Coverity: ("Logically Dead Code")
> Fixes: 9c789deea206 ("soc: xilinx: vcu: implement clock provider for output clocks")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
> 
> V2: Check on mux pointer rather than removing deadcode that wasn't
>     actually really dead code.
> 
> ---
>  drivers/clk/xilinx/xlnx_vcu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/xilinx/xlnx_vcu.c b/drivers/clk/xilinx/xlnx_vcu.c
> index d66b1315114e..256b8c4b9ee4 100644
> --- a/drivers/clk/xilinx/xlnx_vcu.c
> +++ b/drivers/clk/xilinx/xlnx_vcu.c
> @@ -512,7 +512,7 @@ static void xvcu_clk_hw_unregister_leaf(struct clk_hw *hw)
>  
>  	mux = clk_hw_get_parent(divider);
>  	clk_hw_unregister_mux(mux);

The mux should be unregistered after the check

> -	if (!divider)
> +	if (!mux)
>  		return;
>  
>  	clk_hw_unregister_divider(divider);

and the divider before the check.

Michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ