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:   Mon, 12 Nov 2018 09:28:15 -0600
From:   Steve Wise <swise@...lsio.com>
To:     Sabyasachi Gupta <sabyasachi.linux@...il.com>, dledford@...hat.com,
        jgg@...pe.ca
Cc:     jrdr.linux@...il.com, linux-rdma@...r.kernel.org,
        linux-kernel@...r.kernel.org, brajeswar.linux@...il.com
Subject: Re: [PATCH] infiniband/hw/cxgb3/cxio_hal.c: Use dma_zalloc_coherent



On 11/9/2018 10:50 AM, Sabyasachi Gupta wrote:
> Replaced dma_alloc_coherent + memset with dma_zalloc_coherent
> 
> Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@...il.com>
> ---
>  drivers/infiniband/hw/cxgb3/cxio_hal.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c b/drivers/infiniband/hw/cxgb3/cxio_hal.c
> index dcb4bba..df4f7a3 100644
> --- a/drivers/infiniband/hw/cxgb3/cxio_hal.c
> +++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c
> @@ -291,13 +291,12 @@ int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain,
>  	if (!wq->sq)
>  		goto err3;
>  
> -	wq->queue = dma_alloc_coherent(&(rdev_p->rnic_info.pdev->dev),
> +	wq->queue = dma_zalloc_coherent(&(rdev_p->rnic_info.pdev->dev),
>  					     depth * sizeof(union t3_wr),
>  					     &(wq->dma_addr), GFP_KERNEL);
>  	if (!wq->queue)
>  		goto err4;
>  
> -	memset(wq->queue, 0, depth * sizeof(union t3_wr));
>  	dma_unmap_addr_set(wq, mapping, wq->dma_addr);
>  	wq->doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr;
>  	if (!kernel_domain)
> 

Acked-by: Steve Wise <swise@...ngridcomputing.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ