aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTerry Loftin <terry.loftin@hp.com>2010-04-09 06:29:49 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-13 06:03:13 -0400
commitdac876193cd79ced36d0462749ea47c05844fb49 (patch)
tree8b16c5fe80b76ba2fcce7ada953d14269a609980 /drivers
parentd5aa22520dbb49e726420ca56b3dcfe56724d33e (diff)
e1000e: stop cleaning when we reach tx_ring->next_to_use
Tx ring buffers after tx_ring->next_to_use are volatile and could change, possibly causing a crash. Stop cleaning when we hit tx_ring->next_to_use. Signed-off-by: Terry Loftin <terry.loftin@hp.com> Acked-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/e1000e/netdev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index cfd09cea7214..73d43c53015a 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -661,6 +661,8 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter)
661 i = 0; 661 i = 0;
662 } 662 }
663 663
664 if (i == tx_ring->next_to_use)
665 break;
664 eop = tx_ring->buffer_info[i].next_to_watch; 666 eop = tx_ring->buffer_info[i].next_to_watch;
665 eop_desc = E1000_TX_DESC(*tx_ring, eop); 667 eop_desc = E1000_TX_DESC(*tx_ring, eop);
666 } 668 }