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] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 20 Sep 2020 11:37:56 -0400
From:   Chuck Lever <chuck.lever@...cle.com>
To:     Julia Lawall <Julia.Lawall@...ia.fr>,
        Anna Schumaker <anna.schumaker@...app.com>
Cc:     Bruce Fields <bfields@...ldses.org>,
        kernel-janitors@...r.kernel.org,
        Trond Myklebust <trond.myklebust@...merspace.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
        "open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 08/14] xprtrdma: drop double zeroing

Thanks, Julia!

> On Sep 20, 2020, at 7:26 AM, Julia Lawall <Julia.Lawall@...ia.fr> wrote:
> 
> sg_init_table zeroes its first argument, so the allocation of that argument
> doesn't have to.
> 
> the semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x,n,flags;
> @@
> 
> x = 
> - kcalloc
> + kmalloc_array
>  (n,sizeof(*x),flags)
> ...
> sg_init_table(x,n)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@...ia.fr>

Acked-by: Chuck Lever <chuck.lever@...cle.com>

This one goes to Anna.


> ---
> net/sunrpc/xprtrdma/frwr_ops.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -u -p a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c
> --- a/net/sunrpc/xprtrdma/frwr_ops.c
> +++ b/net/sunrpc/xprtrdma/frwr_ops.c
> @@ -124,7 +124,7 @@ int frwr_mr_init(struct rpcrdma_xprt *r_
> 	if (IS_ERR(frmr))
> 		goto out_mr_err;
> 
> -	sg = kcalloc(depth, sizeof(*sg), GFP_NOFS);
> +	sg = kmalloc_array(depth, sizeof(*sg), GFP_NOFS);
> 	if (!sg)
> 		goto out_list_err;
> 
> 

--
Chuck Lever



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ