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:   Wed, 8 Nov 2017 12:00:56 -0800
From:   "Darrick J. Wong" <darrick.wong@...cle.com>
To:     Tim Hansen <devtimhansen@...il.com>
Cc:     linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs/xfs: Remove NULL check before kmem_cache_destroy

On Wed, Nov 08, 2017 at 01:53:10PM -0500, Tim Hansen wrote:
> kmem_cache_destroy already checks for null values.
> 
> Signed-off-by: Tim Hansen <devtimhansen@...il.com>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@...cle.com>

> ---
>  fs/xfs/kmem.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/kmem.h b/fs/xfs/kmem.h
> index 7509019..4b87472 100644
> --- a/fs/xfs/kmem.h
> +++ b/fs/xfs/kmem.h
> @@ -119,8 +119,7 @@ kmem_zone_free(kmem_zone_t *zone, void *ptr)
>  static inline void
>  kmem_zone_destroy(kmem_zone_t *zone)
>  {
> -	if (zone)
> -		kmem_cache_destroy(zone);
> +	kmem_cache_destroy(zone);
>  }
>  
>  extern void *kmem_zone_alloc(kmem_zone_t *, xfs_km_flags_t);
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ