summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2009-12-03 09:46:31 +0000
committerDavid S. Miller <davem@davemloft.net>2009-12-03 13:18:09 -0800
commit51bf6bb424c14bfd3590a0de03fbd07fc800435e (patch)
tree3f11c8cffbc5a0d6a292bd3455271b7a9fdfe054 /drivers
parentcceea982ef78cf358b70f3412a6799f153211e14 (diff)
downloadlinux-stable-51bf6bb424c14bfd3590a0de03fbd07fc800435e.tar.gz
linux-stable-51bf6bb424c14bfd3590a0de03fbd07fc800435e.tar.bz2
linux-stable-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')
-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