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]
Message-ID: <m3tvtqvfz1.fsf@t19.piap.pl>
Date:   Thu, 08 Mar 2018 14:45:06 +0100
From:   khalasa@...p.pl (Krzysztof HaƂasa)
To:     Souptick Joarder <jrdr.linux@...il.com>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH] net: Use dma_pool_zalloc()

Souptick Joarder <jrdr.linux@...il.com> writes:

> Any comment for this patch.

I thought something like this was already aplied.

Acked-by: Krzysztof Halasa <khalasa@...p.pl>

> On Fri, Feb 16, 2018 at 9:58 PM, Souptick Joarder <jrdr.linux@...il.com> wrote:
>> Use dma_pool_zalloc() instead of dma_pool_alloc + memset
>>
>> Signed-off-by: Souptick Joarder <jrdr.linux@...il.com>
>> ---
>>  drivers/net/ethernet/xscale/ixp4xx_eth.c | 3 +--
>>  drivers/net/wan/ixp4xx_hss.c             | 3 +--
>>  2 files changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
>> index aee55c0..5710ae8 100644
>> --- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
>> +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
>> @@ -1108,10 +1108,9 @@ static int init_queues(struct port *port)
>>                         return -ENOMEM;
>>         }
>>
>> -       if (!(port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL,
>> +       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));
>>
>> diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
>> index 6a505c2..0caffbf 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,
>> +       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));
>>

-- 
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