diff options
author | Jon Mason <mason@myri.com> | 2011-06-27 07:05:00 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-29 15:02:04 +0200 |
commit | 3b20b2dc5f713aa7eca20a8ff942292974a1cc94 (patch) | |
tree | 90cf504467ec9b5b1af7748704a966d8f06008be /drivers/net/myri10ge | |
parent | DSA: Enable cascading in multi-chip 6131 configuration (diff) | |
download | linux-3b20b2dc5f713aa7eca20a8ff942292974a1cc94.tar.xz 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>
Diffstat (limited to 'drivers/net/myri10ge')
-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); } |