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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 1 Nov 2016 17:22:29 -0700
From:   Stephen Boyd <sboyd@...eaurora.org>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     lars@...afoo.de, dan.carpenter@...cle.com, ssantosh@...nel.org,
        mturquette@...libre.com, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/3] clk: keystone: Fix an error checking

On 10/24, Christophe JAILLET wrote:
> clk_register_pll() can return ERR_PTR(-ENOMEM) so checking the return value
> against NULL only is not correct.

The code just doesn't propagate the error up to the caller.
Instead the caller treats NULL as an error and non-NULL as valid.
If the callee detects an error it hides it and returns NULL.

> In order to fix it, update clk_register_pll() to always return an error
> pointer in case of error and check the return value with IS_ERR.
> 
> While at it, also fix a tab vs space in the surrounding code.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> Un-compiled and un-tested.

Please at least compile test patches.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ