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: <1d8007f1-15ab-a173-a3ed-cf2235cd2cea@cogentembedded.com>
Date:   Mon, 23 Dec 2019 12:36:22 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Yi Wang <wang.yi59@....com.cn>, steffen.klassert@...unet.com
Cc:     herbert@...dor.apana.org.au, davem@...emloft.net,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        xue.zhihong@....com.cn, up2wing@...il.com, wang.liang82@....com.cn,
        Huang Zijiang <huang.zijiang@....com.cn>
Subject: Re: [PATCH] xfrm: Use kmem_cache_zalloc() instead of
 kmem_cache_alloc() with flag GFP_ZERO.

Hello!

On 23.12.2019 4:53, Yi Wang wrote:

> From: Huang Zijiang <huang.zijiang@....com.cn>
> 
> Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc
> with flag GFP_ZERO since kzalloc sets allocated memory
> to zero.
> 
> Signed-off-by: Huang Zijiang <huang.zijiang@....com.cn>
> Signed-off-by: Yi Wang <wang.yi59@....com.cn>
> ---
>   net/xfrm/xfrm_state.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
> index a5dc319..adfa279 100644
> --- a/net/xfrm/xfrm_state.c
> +++ b/net/xfrm/xfrm_state.c
> @@ -612,7 +612,7 @@ struct xfrm_state *xfrm_state_alloc(struct net *net)
>   {
>       struct xfrm_state *x;
>   
> -    x = kmem_cache_alloc(xfrm_state_cache, GFP_ATOMIC | __GFP_ZERO);
> +x = kmem_cache_zalloc(xfrm_state_cache, GFP_ATOMIC);

    You ate the indentation. :-)

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ