aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2009-12-03 04:46:31 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-03 16:18:09 -0500
commit51bf6bb424c14bfd3590a0de03fbd07fc800435e (patch)
tree3f11c8cffbc5a0d6a292bd3455271b7a9fdfe054 /drivers/net/bnx2.c
parentcceea982ef78cf358b70f3412a6799f153211e14 (diff)
bnx2: Protect tx timeout reset with rtnl_lock().
To prevent race conditions with other reset events. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 4cae2a86e741..03eb51f1c694 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6263,8 +6263,11 @@ bnx2_reset_task(struct work_struct *work)
6263{ 6263{
6264 struct bnx2 *bp = container_of(work, struct bnx2, reset_task); 6264 struct bnx2 *bp = container_of(work, struct bnx2, reset_task);
6265 6265
6266 if (!netif_running(bp->dev)) 6266 rtnl_lock();
6267 if (!netif_running(bp->dev)) {
6268 rtnl_unlock();
6267 return; 6269 return;
6270 }
6268 6271
6269 bnx2_netif_stop(bp); 6272 bnx2_netif_stop(bp);
6270 6273
@@ -6272,6 +6275,7 @@ bnx2_reset_task(struct work_struct *work)
6272 6275
6273 atomic_set(&bp->intr_sem, 1); 6276 atomic_set(&bp->intr_sem, 1);
6274 bnx2_netif_start(bp); 6277 bnx2_netif_start(bp);
6278 rtnl_unlock();
6275} 6279}
6276 6280
6277static void 6281static void