Skip to content

Commit

Permalink
bnx2x: Fix the race on bp->stats_pending.
Browse files Browse the repository at this point in the history
Fix the race on bp->stats_pending between the timer and a LINK_UP event
handler.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vladislav Zolotarov authored and David S. Miller committed Jan 9, 2011
1 parent 084d6cb commit 9bcb801
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/bnx2x/bnx2x_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ static void bnx2x_storm_stats_post(struct bnx2x *bp)

spin_lock_bh(&bp->stats_lock);

if (bp->stats_pending) {
spin_unlock_bh(&bp->stats_lock);
return;
}

ramrod_data.drv_counter = bp->stats_counter++;
ramrod_data.collect_port = bp->port.pmf ? 1 : 0;
for_each_eth_queue(bp, i)
Expand Down

0 comments on commit 9bcb801

Please sign in to comment.