From 3b20b2dc5f713aa7eca20a8ff942292974a1cc94 Mon Sep 17 00:00:00 2001 From: Jon Mason Date: Mon, 27 Jun 2011 05:05:00 +0000 Subject: [PATCH] myri10ge: ensure tx queues remain stopped Ensure that our tx queues remain stopped when we stop them in myri10ge_close(). Not doing so can potentially lead to traffic being transmitted when the interface is removed, which can lead to NULL pointer dereferences. Signed-off-by: Jon Mason Signed-off-by: David S. Miller --- drivers/net/myri10ge/myri10ge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 3ed5f3505cea..a8ae641d0bd1 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c @@ -1461,7 +1461,8 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index) /* start the queue if we've stopped it */ if (netif_tx_queue_stopped(dev_queue) && - tx->req - tx->done < (tx->mask >> 1)) { + tx->req - tx->done < (tx->mask >> 1) && + ss->mgp->running == MYRI10GE_ETH_RUNNING) { tx->wake_queue++; netif_tx_wake_queue(dev_queue); } -- 2.20.1