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: <37795c12-85f2-a9fb-dafb-fd181e04b86f@intel.com>
Date:   Mon, 28 Aug 2023 11:19:13 -0700
From:   Dave Jiang <dave.jiang@...el.com>
To:     <coolrrsh@...il.com>, <fenghua.yu@...el.com>, <vkoul@...nel.org>,
        <dmaengine@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <linux-kernel-mentees@...ts.linuxfoundation.org>
Subject: Re: [PATCH] dma: device: Remove redundant code



On 8/13/23 06:22, coolrrsh@...il.com wrote:
> From: Rajeshwar R Shinde <coolrrsh@...il.com>
> 
> dma_alloc_coherent function already zeroes the array 'addr'.
> So, memset function call is not needed.
> 
> This fixes warning such as:
> drivers/dma/idxd/device.c:783:8-26:
> WARNING: dma_alloc_coherent used in addr already zeroes out memory,
> so memset is not needed.
> 
> Signed-off-by: Rajeshwar R Shinde <coolrrsh@...il.com>

Please rename subject line to:

dmaengine: idxd: Remove redundant memset() for eventlog allocation

With the change,
Reviewed-by: Dave Jiang <dave.jiang@...el.com>

> ---
>   drivers/dma/idxd/device.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
> index 5abbcc61c528..7c74bc60f582 100644
> --- a/drivers/dma/idxd/device.c
> +++ b/drivers/dma/idxd/device.c
> @@ -786,8 +786,6 @@ static int idxd_device_evl_setup(struct idxd_device *idxd)
>   		goto err_alloc;
>   	}
>   
> -	memset(addr, 0, size);
> -
>   	spin_lock(&evl->lock);
>   	evl->log = addr;
>   	evl->dma = dma_addr;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ