提交 3b20b2dc 编写于 作者: J Jon Mason 提交者: David S. Miller

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: NJon Mason <mason@myri.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 81399ec6
...@@ -1461,7 +1461,8 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index) ...@@ -1461,7 +1461,8 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index)
/* start the queue if we've stopped it */ /* start the queue if we've stopped it */
if (netif_tx_queue_stopped(dev_queue) && 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++; tx->wake_queue++;
netif_tx_wake_queue(dev_queue); netif_tx_wake_queue(dev_queue);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册