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:	Tue, 20 Nov 2007 16:20:55 +0900
From:	Simon Horman <horms@...ge.net.au>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	lguest <lguest@...abs.org>,
	virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] virtio: fix net driver loop case where we fail to restart

On Mon, Nov 19, 2007 at 11:20:15AM +1100, Rusty Russell wrote:
> skb is only NULL the first time around: it's more correct to test for
> being under-budget.
> 
> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>

That looks better to me.

Acked-by: Simon Horman <horms@...ge.net.au>

> diff -r 2a94425ac7d5 drivers/net/virtio_net.c
> --- a/drivers/net/virtio_net.c	Thu Nov 15 13:47:28 2007 +1100
> +++ b/drivers/net/virtio_net.c	Thu Nov 15 23:10:44 2007 +1100
> @@ -198,8 +198,8 @@ again:
>  	if (vi->num < vi->max / 2)
>  		try_fill_recv(vi);
>  
> -	/* All done? */
> -	if (!skb) {
> +	/* Out of packets? */
> +	if (received < budget) {
>  		netif_rx_complete(vi->dev, napi);
>  		if (unlikely(!vi->rvq->vq_ops->restart(vi->rvq))
>  		    && netif_rx_reschedule(vi->dev, napi))
> -
> 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

-- 
Horms

-
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