[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1260990759-16236-1-git-send-email-leitao@linux.vnet.ibm.com>
Date: Wed, 16 Dec 2009 13:12:39 -0600
From: leitao@...ux.vnet.ibm.com
To: mchan@...adcom.com
Cc: netdev@...r.kernel.org, Breno Leitao <leitao@...ux.vnet.ibm.com>
Subject: [PATCH] bnx2: reset_task is crashing the kernel. Fixing it.
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@...ux.vnet.ibm.com>
---
drivers/net/bnx2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index f81f082..65df1de 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -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)) {
int i;
@@ -667,6 +666,7 @@ bnx2_netif_stop(struct bnx2 *bp)
txq->trans_start = jiffies;
}
}
+ bnx2_disable_int_sync(bp);
}
static void
--
1.6.0.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists