Skip to contentSkip to conversation

bnx2x: Missing smp_wmb for statistics state machine

PATCH In review Eilon Greenstein 1 participant 1 message Aug 12, 2009

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

PATCH 27/36 bnx2x: Missing smp_wmb for statistics state machine

---
 drivers/net/bnx2x_main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/bnx2x_main.c +3 -0
index 656ee97..bcf8362 100644
@@ -4411,6 +4411,9 @@ static void bnx2x_stats_handle(struct bnx2x *bp, enum bnx2x_stats_event event)
 	bnx2x_stats_stm[state][event].action(bp);
 	bp->stats_state = bnx2x_stats_stm[state][event].next_state;
 
+	/* Make sure the state has been "changed" */
+	smp_wmb();
+
 	if ((event != STATS_EVENT_UPDATE) || (bp->msglevel & NETIF_MSG_TIMER))
 		DP(BNX2X_MSG_STATS, "state %d -> event %d -> state %d\n",
 		   state, event, bp->stats_state);
Signature · 1 line
1.5.4.3