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]
Date:	Sun, 23 Mar 2008 23:07:37 +1100
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	David Miller <davem@...emloft.net>
Cc:	johannes@...solutions.net, netdev@...r.kernel.org
Subject: Re: sungem triggers NAPI warning


On Sun, 2008-03-23 at 03:35 -0700, David Miller wrote:
> From: Johannes Berg <johannes@...solutions.net>
> Date: Tue, 19 Feb 2008 22:38:43 +0100
> 
> > In order to trigger it, I have to transfer a lot of data. I have
> > triggered it now with a full kernel recompilation using -j6 and distcc
> > onto a fast machine (with tg3 network, direct cable, gbit), and with
> > rsync transferring 26GiB data between the machines.
> 
> I'll push the following fix.
> 
> Ben, thanks for letting this fall through the cracks :-)

OOps... sorry.

> commit da990a2402aeaee84837f29054c4628eb02f7493
> Author: David S. Miller <davem@...emloft.net>
> Date:   Sun Mar 23 03:35:12 2008 -0700
> 
>     [SUNGEM]: Fix NAPI assertion failure.
>     
>     As reported by Johannes Berg:
>     
>     I started getting this warning with recent kernels:
>     
>     [  773.908927] ------------[ cut here ]------------
>     [  773.908954] Badness at net/core/dev.c:2204
>      ...
>     
>     If we loop more than once in gem_poll(), we'll
>     use more than the real budget in our gem_rx()
>     calls, thus eventually trigger the caller's
>     assertions in net_rx_action().
>     
>     Subtract "work_done" from "budget" for the second
>     arg to gem_rx() to fix the bug.
>     
>     Signed-off-by: David S. Miller <davem@...emloft.net>
> 
> diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
> index 9721279..4291458 100644
> --- a/drivers/net/sungem.c
> +++ b/drivers/net/sungem.c
> @@ -912,7 +912,7 @@ static int gem_poll(struct napi_struct *napi, int budget)
>  		 * rx ring - must call napi_disable(), which
>  		 * schedule_timeout()'s if polling is already disabled.
>  		 */
> -		work_done += gem_rx(gp, budget);
> +		work_done += gem_rx(gp, budget - work_done);
>  
>  		if (work_done >= budget)
>  			return work_done;

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