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: <5B76471D.1070504@huawei.com>
Date:   Fri, 17 Aug 2018 11:55:09 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     <cpw@....com>, <robinmholt@...il.com>
CC:     <arnd@...db.de>, <gregkh@...uxfoundation.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] misc: remove meanless null check before kfree

On 2018/8/17 11:24, zhong jiang wrote:
> kfree has taken null pointer into account. so check the null pointer
> before kfree is meanless.
 meanless/meaningless.  will repost. please ignore the patch, thanks.
> Signed-off-by: zhong jiang <zhongjiang@...wei.com>
> ---
>  drivers/misc/sgi-xp/xpc_partition.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp/xpc_partition.c
> index 0c3ef6f..3eba1c4 100644
> --- a/drivers/misc/sgi-xp/xpc_partition.c
> +++ b/drivers/misc/sgi-xp/xpc_partition.c
> @@ -98,8 +98,7 @@
>  			len = L1_CACHE_ALIGN(len);
>  
>  		if (len > buf_len) {
> -			if (buf_base != NULL)
> -				kfree(buf_base);
> +			kfree(buf_base);
>  			buf_len = L1_CACHE_ALIGN(len);
>  			buf = xpc_kmalloc_cacheline_aligned(buf_len, GFP_KERNEL,
>  							    &buf_base);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ