diff options
author | Juliet Kim <julietk@linux.vnet.ibm.com> | 2019-09-05 17:30:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-07 17:36:14 +0200 |
commit | 1c2977c094998de032fee6e898c88b4a05483d08 (patch) | |
tree | a4d731cf3a4108af231517bbe64bb9283ec6a901 /drivers/net/ethernet/ibm | |
parent | 63b2ed4e10b2e6c913e1d8cdd728e7fba4115a3d (diff) | |
download | linux-1c2977c094998de032fee6e898c88b4a05483d08.tar.gz linux-1c2977c094998de032fee6e898c88b4a05483d08.tar.bz2 linux-1c2977c094998de032fee6e898c88b4a05483d08.zip |
net/ibmvnic: free reset work of removed device from queue
Commit 36f1031c51a2 ("ibmvnic: Do not process reset during or after
device removal") made the change to exit reset if the driver has been
removed, but does not free reset work items of the adapter from queue.
Ensure all reset work items are freed when breaking out of the loop early.
Fixes: 36f1031c51a2 ("ibmnvic: Do not process reset during or after device removal”)
Signed-off-by: Juliet Kim <julietk@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index fa4bb940665c..6644cabc8e75 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1985,7 +1985,10 @@ static void __ibmvnic_reset(struct work_struct *work) while (rwi) { if (adapter->state == VNIC_REMOVING || adapter->state == VNIC_REMOVED) - goto out; + kfree(rwi); + rc = EBUSY; + break; + } if (adapter->force_reset_recovery) { adapter->force_reset_recovery = false; @@ -2011,7 +2014,7 @@ static void __ibmvnic_reset(struct work_struct *work) netdev_dbg(adapter->netdev, "Reset failed\n"); free_all_rwi(adapter); } -out: + adapter->resetting = false; if (we_lock_rtnl) rtnl_unlock(); |