summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-07-14 16:07:29 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2014-07-14 16:23:53 +0300
commita491a920ff5c22cc09700a2660f6eac55b1ce4c1 (patch)
tree6ca6e00f5cc37a8682d8e337aa2f2e0a476349d8 /drivers/net/wireless/ath
parent7880377012ef48bf75498648c3bcbcb60460ff28 (diff)
downloadop-kernel-dev-a491a920ff5c22cc09700a2660f6eac55b1ce4c1.zip
op-kernel-dev-a491a920ff5c22cc09700a2660f6eac55b1ce4c1.tar.gz
ath10k: fix unregister deadlock when fw probe fails
If firmware probing worker failed it called device_release_driver() which synchronously called remove() pci callback. The callback in turn waited for the worker that called it to finish resulting in a deadlock. Waiting for a completion instead of a worker, like some other drivers do, doesn't seem like the best idea either: Syscall Worker probe_fw() rmmod dev_lock() pci->remove() wait_for_completion() complete_all() device_release_driver() dev_lock() [sleep] free(ar) dev_unlock() [resume] There's no guarantee that Worker upon resuming can still access any data/code of the module. Leaving device bound to a driver is not as harmful as deadlocking so remove the call to device_release_driver() while a proper solution is figured out. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath10k/core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 68bed4e..aaf5f0e 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -990,7 +990,9 @@ err_unregister_mac:
err_release_fw:
ath10k_core_free_firmware_files(ar);
err:
- device_release_driver(ar->dev);
+ /* TODO: It's probably a good idea to release device from the driver
+ * but calling device_release_driver() here will cause a deadlock.
+ */
return;
}
OpenPOWER on IntegriCloud