summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>2017-05-26 10:30:31 -0400
committerDavid S. Miller <davem@davemloft.net>2017-05-26 15:32:45 -0400
commit10f7621588b86d181a167c1535d0754eb5a58ba8 (patch)
treed4944cf1fffd65419a4c7e2d15d36d27e84c3ebd
parent2ce9e4efbf4289ce48144ec4986f58033890fb6d (diff)
downloadlinux-10f7621588b86d181a167c1535d0754eb5a58ba8.tar.bz2
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: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 465a8fafd95b..0f705e68755f 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -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;
}