提交 e5d17c3e 编写于 作者: M Mitch Williams 提交者: Jeff Kirsher

i40evf: don't stop watchdog if it hasn't started

If the VF driver fails to complete early init, then rmmod can cause a
softlock when the driver tries to stop a watchdog timer that never even
got initialized.

Add a check to see if the timer is actually initialized before stopping
it.

Change-ID: Id9d550aa8838e07f4b02afe7bc017ef983779efc
Signed-off-by: NMitch Williams <mitch.a.williams@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 3ba3faeb
......@@ -2408,7 +2408,9 @@ static void i40evf_remove(struct pci_dev *pdev)
i40evf_reset_interrupt_capability(adapter);
}
del_timer_sync(&adapter->watchdog_timer);
if (adapter->watchdog_timer.function)
del_timer_sync(&adapter->watchdog_timer);
flush_scheduled_work();
if (hw->aq.asq.count)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册