summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2009-12-03 10:46:31 +0100
committerDavid S. Miller <davem@davemloft.net>2009-12-03 22:18:09 +0100
commit51bf6bb424c14bfd3590a0de03fbd07fc800435e (patch)
tree3f11c8cffbc5a0d6a292bd3455271b7a9fdfe054 /drivers/net/bnx2.c
parenttg3: Update version to 3.105 (diff)
downloadlinux-51bf6bb424c14bfd3590a0de03fbd07fc800435e.tar.xz
linux-51bf6bb424c14bfd3590a0de03fbd07fc800435e.zip
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)
{
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