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-next>] [day] [month] [year] [list]
Date:   Mon, 12 Dec 2016 10:12:38 +0530
From:   Souptick Joarder <jrdr.linux@...il.com>
To:     Krzysztof Hałasa <khalasa@...p.pl>,
        netdev@...r.kernel.org
Cc:     Rameshwar Sahu <sahu.rameshwar73@...il.com>
Subject: Re: [PATCH] net: wan: Use dma_pool_zalloc

On Fri, Dec 9, 2016 at 6:33 PM, Krzysztof Hałasa <khalasa@...p.pl> wrote:
> Souptick Joarder <jrdr.linux@...il.com> writes:
>
>> We should use dma_pool_zalloc instead of dma_pool_alloc/memset
>>
>> Signed-off-by: Souptick joarder <jrdr.linux@...il.com>
>> ---
>>  drivers/net/wan/ixp4xx_hss.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
>> index e7bbdb7..aaabf31 100644
>> --- a/drivers/net/wan/ixp4xx_hss.c
>> +++ b/drivers/net/wan/ixp4xx_hss.c
>> @@ -976,10 +976,9 @@ static int init_hdlc_queues(struct port *port)
>>                       return -ENOMEM;
>>       }
>>
>> -     if (!(port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL,
>> -                                           &port->desc_tab_phys)))
>> +     if (!(port->desc_tab = dma_pool_zalloc(dma_pool, GFP_KERNEL,
>> +                                            &port->desc_tab_phys)))
>>               return -ENOMEM;
>> -     memset(port->desc_tab, 0, POOL_ALLOC_SIZE);
>>       memset(port->rx_buff_tab, 0, sizeof(port->rx_buff_tab)); /* tables */
>>       memset(port->tx_buff_tab, 0, sizeof(port->tx_buff_tab));
>
> This look fine, feel free to send it to the netdev mailing list for
> inclusion.

Including netdev mailing list based as requested.

>
> Acked-by: Krzysztof Halasa <khalasa@...p.pl>
> --
> Krzysztof Halasa
>
> Industrial Research Institute for Automation and Measurements PIAP
> Al. Jerozolimskie 202, 02-486 Warsaw, Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ