Skip to contentSkip to conversation

e1000e: stop cleaning when we reach tx_ring->next_to_use

PATCH In review Terry Loftin 3 participants 3 messages Mar 31, 2010 – Apr 2, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

drivers/net/e1000e/netdev.c +2 -0
index e1cceb6..60288e4 100644
@@ -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);
 	}
maintainer
#1 lore raw

From: Terry Loftin <[email protected]>
Date: Wed, 31 Mar 2010 14:01:52 -0600

Quoted 5 lines

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.

Intel folks please look carefully at this fix. I want to get it into net-2.6 if it's correct.

Thanks.

#2 lore raw
Quoted 7 lines · David Miller

From: Terry Loftin <[email protected]>
Date: Wed, 31 Mar 2010 14:01:52 -0600

Quoted 4 lines

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.

Quoted 6 lines
Quoted 1 line

Intel folks please look carefully at this fix. I want to get it into net-2.6 if it's correct.

Thanks.

Got this one as well...

Signature · 2 lines
Cheers,
Jeff