diff options
author | Jon Mason <mason@myri.com> | 2011-06-27 05:05:00 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-29 06:02:04 -0700 |
commit | 3b20b2dc5f713aa7eca20a8ff942292974a1cc94 (patch) | |
tree | 90cf504467ec9b5b1af7748704a966d8f06008be | |
parent | 81399ec683632b85863b093f4fffe2b4511e49e6 (diff) | |
download | blackbird-op-linux-3b20b2dc5f713aa7eca20a8ff942292974a1cc94.tar.gz blackbird-op-linux-3b20b2dc5f713aa7eca20a8ff942292974a1cc94.zip |
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 <mason@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |