diff options
author | Michael Chan <mchan@broadcom.com> | 2009-12-03 09:46:31 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-03 13:18:09 -0800 |
commit | 51bf6bb424c14bfd3590a0de03fbd07fc800435e (patch) | |
tree | 3f11c8cffbc5a0d6a292bd3455271b7a9fdfe054 /drivers/net/bnx2.c | |
parent | cceea982ef78cf358b70f3412a6799f153211e14 (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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 4cae2a86e74..03eb51f1c69 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 |