提交 10f76215 编写于 作者: T Thomas Falcon 提交者: David S. Miller

ibmvnic: Fix cleanup of SKB's on driver close

A race condition occurs when closing the driver. Free'ing of skb's
can race between the close routine and ibmvnic_tx_interrupt. To fix
this we move the claenup of tx pools during close to after the
sub-CRQ interrupts are disabled.
Signed-off-by: NThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2ce9e4ef
......@@ -804,7 +804,6 @@ static int __ibmvnic_close(struct net_device *netdev)
adapter->state = VNIC_CLOSING;
netif_tx_stop_all_queues(netdev);
ibmvnic_napi_disable(adapter);
clean_tx_pools(adapter);
if (adapter->tx_scrq) {
for (i = 0; i < adapter->req_tx_queues; i++)
......@@ -833,6 +832,7 @@ static int __ibmvnic_close(struct net_device *netdev)
}
}
clean_tx_pools(adapter);
adapter->state = VNIC_CLOSED;
return rc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册