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

Commit 9bcb8018 authored by Vladislav Zolotarov's avatar Vladislav Zolotarov Committed by David S. Miller
Browse files

bnx2x: Fix the race on bp->stats_pending.



Fix the race on bp->stats_pending between the timer and a LINK_UP event
handler.

Signed-off-by: default avatarVladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 084d6cbb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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)