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: <379a53af-55cc-e409-3689-58445c084123@aquantia.com>
Date:   Sat, 18 Feb 2017 19:33:31 +0300
From:   Pavel Belous <pavel.belous@...antia.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        Simon Edelhaus <Simon.Edelhaus@...antia.com>,
        Alexey Andriyanov <Alexey.Andriyanov@...antia.com>,
        Lino Sanfilippo <LinoSanfilippo@....de>
Subject: Re: [PATCH net-next v2 11/12] net: ethernet: aquantia: Fixed memory
 allocation if AQ_CFG_RX_FRAME_MAX > 1 page.

On 02/18/2017 01:43 AM, Andrew Lunn wrote:
>> diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
>> index 4c40644..0877625 100644
>> --- a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
>> +++ b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
>> @@ -278,6 +278,8 @@ int aq_ring_rx_fill(struct aq_ring_s *self)
>>  	struct aq_ring_buff_s *buff = NULL;
>>  	int err = 0;
>>  	int i = 0;
>> +	unsigned int pages_order = fls(AQ_CFG_RX_FRAME_MAX / PAGE_SIZE +
>> +		(AQ_CFG_RX_FRAME_MAX % PAGE_SIZE ? 1 : 0)) - 1;
>
> Reverse Christmas tree?
>
> 	Andrew
>

Thank you.
I will fix it in v3.

Regards,
Pavel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ