提交 1c2977c0 编写于 作者: J Juliet Kim 提交者: David S. Miller

net/ibmvnic: free reset work of removed device from queue

Commit 36f1031c ("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: 36f1031c ("ibmnvic: Do not process reset during or after device removal”)
Signed-off-by: NJuliet Kim <julietk@linux.vnet.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 63b2ed4e
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册