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: <20120413.152214.1993707733249175187.davem@davemloft.net>
Date:	Fri, 13 Apr 2012 15:22:14 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	bhutchings@...arflare.com
Cc:	antonz@...allels.com, netdev@...r.kernel.org, jcliburn@...il.com,
	csnook@...hat.com, khorenko@...allels.com
Subject: Re: [PATCH 2/9] atl1: make driver napi compatible

From: Ben Hutchings <bhutchings@...arflare.com>
Date: Fri, 13 Apr 2012 18:15:15 +0100

> On Fri, 2012-04-13 at 20:09 +0400, Tony Zelenoff wrote:
>> This is first step, here there is no fine interrupt
>> disabling which cause TX/ERR interrupts stalling when
>> RX scheduled ints processed.
>> 
>> Signed-off-by: Tony Zelenoff <antonz@...allels.com>
>> ---
>>  drivers/net/ethernet/atheros/atlx/atl1.c |   46 ++++++++++++++++++++++++++----
>>  drivers/net/ethernet/atheros/atlx/atl1.h |    1 +
>>  2 files changed, 41 insertions(+), 6 deletions(-)
>> 
>> diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
>> index 6438239..d39c1b9 100644
>> --- a/drivers/net/ethernet/atheros/atlx/atl1.c
>> +++ b/drivers/net/ethernet/atheros/atlx/atl1.c
>> @@ -1917,7 +1917,7 @@ next:
>>  	return num_alloc;
>>  }
>>  
>> -static void atl1_intr_rx(struct atl1_adapter *adapter)
>> +static int atl1_intr_rx(struct atl1_adapter *adapter, int budget)
>>  {
>>  	int i, count;
>>  	u16 length;
>> @@ -1933,7 +1933,7 @@ static void atl1_intr_rx(struct atl1_adapter *adapter)
>>  
>>  	rrd_next_to_clean = atomic_read(&rrd_ring->next_to_clean);
>>  
>> -	while (1) {
>> +	while (count <= budget) {
> [...]
> 
> Off by one; the test should be count < budget.  Otherwise you can exit
> with count == budget + 1 and net_rx_action() will WARN you about that.

Right, this needs to be fixed up.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ