* [PATCH net-2.6 4/5] bnx2x: Fix the race on bp->stats_pending.
@ 2011-01-09 12:20 Vladislav Zolotarov
2011-01-09 23:49 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Vladislav Zolotarov @ 2011-01-09 12:20 UTC (permalink / raw)
To: Dave Miller; +Cc: netdev list, Eilon Greenstein
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>
---
drivers/net/bnx2x/bnx2x_stats.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
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)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-2.6 4/5] bnx2x: Fix the race on bp->stats_pending.
2011-01-09 12:20 [PATCH net-2.6 4/5] bnx2x: Fix the race on bp->stats_pending Vladislav Zolotarov
@ 2011-01-09 23:49 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-01-09 23:49 UTC (permalink / raw)
To: vladz; +Cc: netdev, eilong
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-09 23:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-09 12:20 [PATCH net-2.6 4/5] bnx2x: Fix the race on bp->stats_pending Vladislav Zolotarov
2011-01-09 23:49 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).