netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] bnx2: Protect tx timeout reset with rtnl_lock().
@ 2009-12-03 19:46 Michael Chan
  2009-12-03 19:46 ` [PATCH 2/5] bnx2: Dump some state during tx timeout Michael Chan
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Michael Chan @ 2009-12-03 19:46 UTC (permalink / raw)
  To: davem; +Cc: netdev

To prevent race conditions with other reset events.

Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/bnx2.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 4cae2a8..03eb51f 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6263,8 +6263,11 @@ bnx2_reset_task(struct work_struct *work)
 {
 	struct bnx2 *bp = container_of(work, struct bnx2, reset_task);
 
-	if (!netif_running(bp->dev))
+	rtnl_lock();
+	if (!netif_running(bp->dev)) {
+		rtnl_unlock();
 		return;
+	}
 
 	bnx2_netif_stop(bp);
 
@@ -6272,6 +6275,7 @@ bnx2_reset_task(struct work_struct *work)
 
 	atomic_set(&bp->intr_sem, 1);
 	bnx2_netif_start(bp);
+	rtnl_unlock();
 }
 
 static void
-- 
1.6.4.GIT



^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-12-03 22:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-03 19:46 [PATCH 1/5] bnx2: Protect tx timeout reset with rtnl_lock() Michael Chan
2009-12-03 19:46 ` [PATCH 2/5] bnx2: Dump some state during tx timeout Michael Chan
2009-12-03 21:07   ` David Miller
2009-12-03 19:46 ` [PATCH 3/5] bnx2: Print warning when unable to allocate the full SKB/page ring Michael Chan
2009-12-03 21:08   ` David Miller
2009-12-03 21:49     ` Michael Chan
2009-12-03 22:05       ` David Miller
2009-12-03 19:46 ` [PATCH 4/5] bnx2: Read firmware version from VPD Michael Chan
2009-12-03 20:17   ` Ben Hutchings
2009-12-03 21:43     ` Michael Chan
2009-12-03 21:08   ` David Miller
2009-12-03 19:46 ` [PATCH 5/5] bnx2: Update version to 2.0.3 Michael Chan
2009-12-03 21:08   ` David Miller
2009-12-03 21:07 ` [PATCH 1/5] bnx2: Protect tx timeout reset with rtnl_lock() 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).