提交 934037bc 编写于 作者: S Sathya Perla 提交者: David S. Miller

be2net: Fix be_tx_q_clean() being called on freed queues

In the tx queue destroy path, be_tx_q_clean() is currently called after the tx queues are freed; it must be called before.
Signed-off-by: NSathya Perla <sathyap@serverengines.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a7a0ef31
......@@ -1056,8 +1056,13 @@ static void be_tx_queues_destroy(struct be_adapter *adapter)
struct be_queue_info *q;
q = &adapter->tx_obj.q;
if (q->created)
if (q->created) {
be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_TXQ);
/* No more tx completions can be rcvd now; clean up if there
* are any pending completions or pending tx requests */
be_tx_q_clean(adapter);
}
be_queue_free(adapter, q);
q = &adapter->tx_obj.cq;
......@@ -1065,10 +1070,6 @@ static void be_tx_queues_destroy(struct be_adapter *adapter)
be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_CQ);
be_queue_free(adapter, q);
/* No more tx completions can be rcvd now; clean up if there are
* any pending completions or pending tx requests */
be_tx_q_clean(adapter);
q = &adapter->tx_eq.q;
if (q->created)
be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_EQ);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册