Skip to content

Commit 10f7621

Browse files
tlfalcondavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2ce9e4e commit 10f7621

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,6 @@ static int __ibmvnic_close(struct net_device *netdev)
804804
adapter->state = VNIC_CLOSING;
805805
netif_tx_stop_all_queues(netdev);
806806
ibmvnic_napi_disable(adapter);
807-
clean_tx_pools(adapter);
808807

809808
if (adapter->tx_scrq) {
810809
for (i = 0; i < adapter->req_tx_queues; i++)
@@ -833,6 +832,7 @@ static int __ibmvnic_close(struct net_device *netdev)
833832
}
834833
}
835834

835+
clean_tx_pools(adapter);
836836
adapter->state = VNIC_CLOSED;
837837
return rc;
838838
}

0 commit comments

Comments
 (0)