Skip to content

Commit

Permalink
bnx2: reset_task is crashing the kernel. Fixing it.
Browse files Browse the repository at this point in the history
If bnx2 schedules a reset via the reset_task, e.g., due to a TX
timeout, it's possible for the NIC to be disabled with packets
pending for transmit.  In this case, napi_disable will loop forever,
eventually crashing the kernel.  This patch moves the disable of
the device to after the napi_disable call.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Breno Leitao authored and David S. Miller committed Dec 19, 2009
1 parent 3705e11 commit 4529819
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,6 @@ static void
bnx2_netif_stop(struct bnx2 *bp)
{
bnx2_cnic_stop(bp);
bnx2_disable_int_sync(bp);
if (netif_running(bp->dev)) {
bnx2_napi_disable(bp);
netif_tx_disable(bp->dev);
Expand All @@ -672,6 +671,7 @@ bnx2_netif_start(struct bnx2 *bp)
bnx2_cnic_start(bp);
}
}
bnx2_disable_int_sync(bp);
}

static void
Expand Down

0 comments on commit 4529819

Please sign in to comment.