Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dac87619 authored by Terry Loftin's avatar Terry Loftin Committed by David S. Miller
Browse files

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: default avatarTerry Loftin <terry.loftin@hp.com>
Acked-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d5aa2252
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -661,6 +661,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);
	}