Skip to contentSkip to conversation

ixgbe: fix for race with 8259(8|9) during shutdown

PATCH Applied Jeff Kirsher 2 participants 2 messages Jun 11, 2010 – Jun 14, 2010

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

PATCH 1/1 ixgbe: fix for race with 8259(8|9) during shutdown

From: Don Skidmore <[email protected]>

There is a small window where the watchdog could be running as the interface is brought down on a NIC with two ports wired back to back. If ixgbe_update_status is then called can lead to a panic. This patch allows the update to bail if we are in that condition.

This issue was orignally reported and fix proposed by Akihiko Saitou.

---

 drivers/net/ixgbe/ixgbe_main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +4 -0
index b2af2f6..ce30c62 100644
@@ -5282,6 +5282,10 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
 	u32 i, missed_rx = 0, mpc, bprc, lxon, lxoff, xon_off_tot;
 	u64 non_eop_descs = 0, restart_queue = 0;
 
+	if (test_bit(__IXGBE_DOWN, &adapter->state) ||
+	    test_bit(__IXGBE_RESETTING, &adapter->state))
+		return;
+
 	if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
 		u64 rsc_count = 0;
 		u64 rsc_flush = 0;
maintainer Applied
#1 lore raw

From: Jeff Kirsher <[email protected]>
Date: Fri, 11 Jun 2010 16:20:29 -0700

Quoted 7 lines

From: Don Skidmore <[email protected]>

There is a small window where the watchdog could be running as the interface is brought down on a NIC with two ports wired back to back. If ixgbe_update_status is then called can lead to a panic. This patch allows the update to bail if we are in that condition.

Quoted 5 lines

This issue was orignally reported and fix proposed by Akihiko Saitou.

Applied.