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>
This commit is contained in:
parent
cceea982ef
commit
51bf6bb424
1 changed files with 5 additions and 1 deletions
|
@ -6263,8 +6263,11 @@ bnx2_reset_task(struct work_struct *work)
|
||||||
{
|
{
|
||||||
struct bnx2 *bp = container_of(work, struct bnx2, reset_task);
|
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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bnx2_netif_stop(bp);
|
bnx2_netif_stop(bp);
|
||||||
|
|
||||||
|
@ -6272,6 +6275,7 @@ bnx2_reset_task(struct work_struct *work)
|
||||||
|
|
||||||
atomic_set(&bp->intr_sem, 1);
|
atomic_set(&bp->intr_sem, 1);
|
||||||
bnx2_netif_start(bp);
|
bnx2_netif_start(bp);
|
||||||
|
rtnl_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Reference in a new issue