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]
Date:   Tue, 15 Jun 2021 14:37:29 +0100
From:   Pavel Begunkov <asml.silence@...il.com>
To:     Zheng Yongjun <zhengyongjun3@...wei.com>, axboe@...nel.dk,
        io-uring@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] io_uring: Remove unneeded if-null-free check

On 6/2/21 7:54 AM, Zheng Yongjun wrote:
> Eliminate the following coccicheck warning:
> 
> fs/io_uring.c:6056:4-9: WARNING: NULL check before some freeing functions is not needed.
> fs/io_uring.c:1744:2-7: WARNING: NULL check before some freeing functions is not needed.
> fs/io_uring.c:3340:2-7: WARNING: NULL check before some freeing functions is not needed.
> fs/io_uring.c:4612:2-7: WARNING: NULL check before some freeing functions is not needed.
> fs/io_uring.c:4375:2-7: WARNING: NULL check before some freeing functions is not needed.
> fs/io_uring.c:3441:2-7: WARNING: NULL check before some freeing functions is not needed.

Take a look at the comments right above changed lines.

> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
> ---
>  fs/io_uring.c | 18 ++++++------------
>  1 file changed, 6 insertions(+), 12 deletions(-)
[...]
>  	/* it's reportedly faster than delegating the null check to kfree() */
> -	if (iovec)
> -		kfree(iovec);
> +	kfree(iovec);
[...]

-- 
Pavel Begunkov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ