[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180112210837.112628-1-briannorris@chromium.org>
Date: Fri, 12 Jan 2018 13:08:36 -0800
From: Brian Norris <briannorris@...omium.org>
To: Ganapathi Bhat <gbhat@...vell.com>,
Nishant Sarmukadam <nishants@...vell.com>,
Kalle Valo <kvalo@...eaurora.org>,
Amitkumar Karwar <amitkarwar@...il.com>
Cc: <linux-kernel@...r.kernel.org>, linux-wireless@...r.kernel.org,
Ellie Reeves <ellierevves@...il.com>,
Christoph Hellwig <hch@....de>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Zhiyuan Yang <yangzy@...vell.com>,
Tim Song <songtao@...vell.com>, Cathy Luo <cluo@...vell.com>,
James Cao <jcao@...vell.com>,
Brian Norris <briannorris@...omium.org>,
"Signed-off-by : Xinming Hu" <huxm@...vell.com>
Subject: [PATCH 1/2] Revert "mwifiex: cancel pcie/sdio work in remove/shutdown handler"
This reverts commit b713bbf1471b56b572ce26bd02b81a85c2b007f4.
The "fix" in question does not actually fix all related problems, and it
also introduces new deadlock possibilities. Since commit b014e96d1abb
("PCI: Protect pci_error_handlers->reset_notify() usage with
device_lock()"), the race in question is actually resolved (PCIe reset
cannot happen at the same time as remove()). Instead, this "fix" just
introduces a deadlock where mwifiex_pcie_card_reset_work() is waiting on
device_lock, which is held by PCIe device remove(), which is waiting
on...mwifiex_pcie_card_reset_work().
The proper thing to do is just to fix the deadlock. Patch for this will
come separately.
Cc: Signed-off-by: Xinming Hu <huxm@...vell.com>
Signed-off-by: Brian Norris <briannorris@...omium.org>
---
drivers/net/wireless/marvell/mwifiex/pcie.c | 2 --
drivers/net/wireless/marvell/mwifiex/sdio.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index 23209c5cab05..f666cb2ea7e0 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -310,8 +310,6 @@ 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);
}
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
index 248858723753..a82880132af4 100644
--- a/drivers/net/wireless/marvell/mwifiex/sdio.c
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c
@@ -399,8 +399,6 @@ mwifiex_sdio_remove(struct sdio_func *func)
mwifiex_init_shutdown_fw(priv, MWIFIEX_FUNC_SHUTDOWN);
}
- cancel_work_sync(&card->work);
-
mwifiex_remove_card(adapter);
}
--
2.16.0.rc1.238.g530d649a79-goog
Powered by blists - more mailing lists