Message ID | 1294575634.31551.18.camel@lb-tlvb-vladz |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: "Vladislav Zolotarov" <vladz@broadcom.com> Date: Sun, 9 Jan 2011 14:20:34 +0200 > 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> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c index 4733c83..0df483d 100644 --- a/drivers/net/bnx2x/bnx2x_stats.c +++ b/drivers/net/bnx2x/bnx2x_stats.c @@ -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_queue(bp, i)