aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/marvell/mwifiex/pcie.c
diff options
context:
space:
mode:
authorXinming Hu <huxm@marvell.com>2017-12-13 19:27:53 +0800
committerKalle Valo <kvalo@codeaurora.org>2018-01-08 19:38:11 +0200
commitb713bbf1471b56b572ce26bd02b81a85c2b007f4 (patch)
tree282df9f6011a61da59db4a3672ecce7a1290b43f /drivers/net/wireless/marvell/mwifiex/pcie.c
parentmwifiex: debugfs: trigger device dump for usb interface (diff)
downloadlinux-dev-b713bbf1471b56b572ce26bd02b81a85c2b007f4.tar.xz
linux-dev-b713bbf1471b56b572ce26bd02b81a85c2b007f4.zip
mwifiex: cancel pcie/sdio work in remove/shutdown handler
The last command used to shutdown firmware might be timeout, and trigger firmware dump in asynchronous pcie/sdio work. The remove/shutdown handler will continue free core data structure private/adapter, which might be dereferenced in pcie/sdio work, finally crash the kernel. Sync and Cancel pcie/sdio work, could be a fix for above cornel case. In this way, the last command timeout could be handled properly. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/pcie.c')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/pcie.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index f666cb2ea7e0..23209c5cab05 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -310,6 +310,8 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev)
mwifiex_init_shutdown_fw(priv, MWIFIEX_FUNC_SHUTDOWN);
}
+ cancel_work_sync(&card->work);
+
mwifiex_remove_card(adapter);
}