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]
Message-ID: <202106162019.1766DA0@keescook>
Date:   Wed, 16 Jun 2021 20:19:25 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Pu Lehui <pulehui@...wei.com>
Cc:     anton@...msg.org, ccross@...roid.com, tony.luck@...el.com,
        linux-kernel@...r.kernel.org, zhangjinhao2@...wei.com
Subject: Re: [PATCH -next] pstore/blk: Fix return value check in
 pstore_blk_init()

On Thu, Jun 17, 2021 at 08:54:24AM +0800, Pu Lehui wrote:
> Fix the return value check which testing the wrong variable
> in pstore_blk_init().
> 
> Signed-off-by: Pu Lehui <pulehui@...wei.com>
> ---
>  fs/pstore/blk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/pstore/blk.c b/fs/pstore/blk.c
> index ccfb11ee4d50..d5e22e6209a6 100644
> --- a/fs/pstore/blk.c
> +++ b/fs/pstore/blk.c
> @@ -287,7 +287,7 @@ static int __init pstore_blk_init(void)
>  		struct pstore_device_info *best_effort_dev;
>  
>  		best_effort_dev = kzalloc(sizeof(*best_effort_dev), GFP_KERNEL);
> -		if (!best_effort) {
> +		if (!best_effort_dev) {
>  			ret = -ENOMEM;
>  			goto unlock;
>  		}

Whoops; thanks!

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ