public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp•com.au>
To: Jeff Garzik <jeff@garzik•org>
Cc: netdev@vger•kernel.org,
	virtualization@lists•linux-foundation.org,
	Mark McLoughlin <markmc@redhat•com>,
	Wang Chen <wangchen@cn•fujitsu.com>
Subject: [PATCH 3/3] virtio: Use __skb_queue_purge()
Date: Mon, 26 May 2008 17:53:23 +1000	[thread overview]
Message-ID: <200805261753.23860.rusty@rustcorp.com.au> (raw)
In-Reply-To: <200805261748.13449.rusty@rustcorp.com.au>

From: Wang Chen <wangchen@cn•fujitsu.com>

Use standard routine for queue purging.

Signed-off-by: Wang Chen <wangchen@cn•fujitsu.com>
Signed-off-by: Rusty Russell <rusty@rustcorp•com.au>
---
 drivers/net/virtio_net.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index f926b5a..fe7cdf2 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -470,8 +470,7 @@ static void virtnet_remove(struct virtio_device *vdev)
 		kfree_skb(skb);
 		vi->num--;
 	}
-	while ((skb = __skb_dequeue(&vi->send)) != NULL)
-		kfree_skb(skb);
+	__skb_queue_purge(&vi->send);
 
 	BUG_ON(vi->num != 0);
 

  reply	other threads:[~2008-05-26  7:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-26  7:42 [PATCH 1/3] virtio: fix virtio_net xmit of freed skb bug Rusty Russell
2008-05-26  7:48 ` [PATCH 2/3] virtio: fix delayed xmit of packet and freeing of old packets Rusty Russell
2008-05-26  7:53   ` Rusty Russell [this message]
2008-05-26  8:11     ` [PATCH 3/3] virtio: Use __skb_queue_purge() Wang Chen
2008-05-27 11:01   ` [PATCH 2/3] virtio: fix delayed xmit of packet and freeing of old packets Mark McLoughlin
2008-05-28  4:59     ` Rusty Russell
2008-05-27 11:06 ` [PATCH 1/3] virtio: fix virtio_net xmit of freed skb bug Mark McLoughlin
2008-05-29  6:34   ` Rusty Russell
2008-06-13 14:14     ` Mark McLoughlin
2008-06-13 19:57       ` Jeff Garzik
2008-06-14  7:39       ` Rusty Russell
2008-05-31  2:12 ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200805261753.23860.rusty@rustcorp.com.au \
    --to=rusty@rustcorp$(echo .)com.au \
    --cc=jeff@garzik$(echo .)org \
    --cc=markmc@redhat$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=virtualization@lists$(echo .)linux-foundation.org \
    --cc=wangchen@cn$(echo .)fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox