diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-14 12:30:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-14 12:30:42 -0400 |
commit | c4e7ac5d427a48b91752671523f39a04e63e12ff (patch) | |
tree | 72168de27e0211c1714e1b0073b8640de85a5f6f /drivers/net/xen-netfront.c | |
parent | c019b1933015ee31366eeaa085bad3ee9516991c (diff) | |
parent | ce57a02c64052c3f1c62f30a902a937e6c316d88 (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
e1000: Add device IDs of new 82571 board variants
xen-netfront: Avoid deref'ing skbafter it is potentially freed.
3c59x maintainer
3c59x: fix duplex configuration
natsemi: fix netdev error acounting
ax88796 printk fixes
myri10ge: Use the pause counter to avoid a needless device reset
via-rhine: disable rx_copybreak on archs that don't allow unaligned DMA access
Diffstat (limited to 'drivers/net/xen-netfront.c')
-rw-r--r-- | drivers/net/xen-netfront.c | 7 |
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) | |||
566 | if (notify) | 566 | if (notify) |
567 | notify_remote_via_irq(np->netdev->irq); | 567 | notify_remote_via_irq(np->netdev->irq); |
568 | 568 | ||
569 | np->stats.tx_bytes += skb->len; | ||
570 | np->stats.tx_packets++; | ||
571 | |||
572 | /* Note: It is not safe to access skb after xennet_tx_buf_gc()! */ | ||
569 | xennet_tx_buf_gc(dev); | 573 | xennet_tx_buf_gc(dev); |
570 | 574 | ||
571 | if (!netfront_tx_slot_available(np)) | 575 | if (!netfront_tx_slot_available(np)) |
@@ -573,9 +577,6 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
573 | 577 | ||
574 | spin_unlock_irq(&np->tx_lock); | 578 | spin_unlock_irq(&np->tx_lock); |
575 | 579 | ||
576 | np->stats.tx_bytes += skb->len; | ||
577 | np->stats.tx_packets++; | ||
578 | |||
579 | return 0; | 580 | return 0; |
580 | 581 | ||
581 | drop: | 582 | drop: |