public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH 1/1] e1000e:  stop cleaning when we reach tx_ring->next_to_use
@ 2010-03-31 20:01 Terry Loftin
  2010-04-02  2:33 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Terry Loftin @ 2010-03-31 20:01 UTC (permalink / raw)
  To: netdev, e1000-devel, Jeff Kirsher, Jesse Brandeburg

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>
---
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index e1cceb6..60288e4 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -660,6 +660,8 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter)
 				i = 0;
 		}

+		if (i == tx_ring->next_to_use)
+			break;
 		eop = tx_ring->buffer_info[i].next_to_watch;
 		eop_desc = E1000_TX_DESC(*tx_ring, eop);
 	}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-02  4:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-31 20:01 [PATCH 1/1] e1000e: stop cleaning when we reach tx_ring->next_to_use Terry Loftin
2010-04-02  2:33 ` David Miller
2010-04-02  4:13   ` Jeff Kirsher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox