diff options
author | Juliet Kim <julietk@linux.vnet.ibm.com> | 2019-09-05 17:30:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-01 08:25:59 +0200 |
commit | 373f9092df9556685174aeec9ac5658a8d3bff72 (patch) | |
tree | 02706e8e96a9f5a483dbed4ffb79946a3826c8f5 | |
parent | 2af977b0d1db2c424edcf0fa5fc4e3b7e2cde9b5 (diff) | |
download | linux-stable-373f9092df9556685174aeec9ac5658a8d3bff72.tar.gz linux-stable-373f9092df9556685174aeec9ac5658a8d3bff72.tar.bz2 linux-stable-373f9092df9556685174aeec9ac5658a8d3bff72.zip |
net/ibmvnic: free reset work of removed device from queue
[ Upstream commit 1c2977c094998de032fee6e898c88b4a05483d08 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 5a57be66a487..f232943c818b 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -2000,7 +2000,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; @@ -2026,7 +2029,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(); |