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: <fcbf537f-6e95-0e25-710a-02a3a6e7961a@arm.com>
Date:   Mon, 21 Jan 2019 11:43:51 +0000
From:   Robin Murphy <Robin.Murphy@....com>
To:     Sabyasachi Gupta <sabyasachi.linux@...il.com>,
        "ysato@...rs.sourceforge.jp" <ysato@...rs.sourceforge.jp>,
        "dalias@...c.org" <dalias@...c.org>,
        "thomas.petazzoni@...e-electrons.com" 
        <thomas.petazzoni@...e-electrons.com>,
        "jacopo+renesas@...ndi.org" <jacopo+renesas@...ndi.org>
CC:     "jrdr.linux@...il.com" <jrdr.linux@...il.com>,
        "linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "brajeswar.linux@...il.com" <brajeswar.linux@...il.com>
Subject: Re: [PATCH] arch/sh/mm/consistent.c: Use dma_zalloc_coherent

On 28/10/2018 06:58, Sabyasachi Gupta wrote:
> Replaced dma_alloc_coherent + memset with dma_zalloc_coherant

Please take a look at linux-next where we've already phased out
dma_zalloc_coherent(). The memset() should still be redundant and worth
cleaning up, though.

Thanks,
Robin.

> Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@...il.com>
> ---
>   arch/sh/mm/consistent.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c
> index 792f361..fc8d235 100644
> --- a/arch/sh/mm/consistent.c
> +++ b/arch/sh/mm/consistent.c
> @@ -52,13 +52,12 @@ int __init platform_resource_setup_memory(struct platform_device *pdev,
>   if (!memsize)
>   return 0;
>
> -buf = dma_alloc_coherent(&pdev->dev, memsize, &dma_handle, GFP_KERNEL);
> +buf = dma_zalloc_coherent(&pdev->dev, memsize, &dma_handle, GFP_KERNEL);
>   if (!buf) {
>   pr_warning("%s: unable to allocate memory\n", name);
>   return -ENOMEM;
>   }
>
> -memset(buf, 0, memsize);
>
>   r->flags = IORESOURCE_MEM;
>   r->start = dma_handle;
>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ