summaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netfront.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-08-23 10:43:14 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2007-08-23 10:43:14 +0100
commitac0c955d5048c2c580fa7166a89133f0fd76c125 (patch)
tree041ac4fb544c7244a1a0b35c8ceabc142d5645c1 /drivers/net/xen-netfront.c
parent68d09b1b6780415d82160f6b6d88e82bd724e691 (diff)
parentb377fd3982ad957c796758a90e2988401a884241 (diff)
downloadlinux-ac0c955d5048c2c580fa7166a89133f0fd76c125.tar.bz2
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/net/xen-netfront.c')
-rw-r--r--drivers/net/xen-netfront.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 489f69c5d6ca..4445810335a8 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -566,6 +566,10 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (notify)
notify_remote_via_irq(np->netdev->irq);
+ np->stats.tx_bytes += skb->len;
+ np->stats.tx_packets++;
+
+ /* Note: It is not safe to access skb after xennet_tx_buf_gc()! */
xennet_tx_buf_gc(dev);
if (!netfront_tx_slot_available(np))
@@ -573,9 +577,6 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
spin_unlock_irq(&np->tx_lock);
- np->stats.tx_bytes += skb->len;
- np->stats.tx_packets++;
-
return 0;
drop: