diff options
| author | Jeff Johnson <jjohnson@codeaurora.org> | 2017-02-01 15:31:16 -0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-02-03 13:50:39 -0800 |
| commit | d1ae706c831e95331b64a256c1107d2c18c56f80 (patch) | |
| tree | f4ffc4cbe9eeed66dfc7c057a276302cab4140c3 | |
| parent | 3bcddfbae75bf09e91046bc2d37fb1d3a918b50f (diff) | |
qcacld-3.0: Fix rtnl_lock usage in HDD startup failure path
Currently in the error-handling path of hdd_wlan_startup() there are
two issues with respect to the rtnl_lock:
1) hdd_close_all_adapters() may be called with the rtnl_lock parameter
set to false even though the rtnl_lock is being held.
2) the function could possibly take the rtnl_lock and never release it.
Fix these issues in hdd_wlan_startup().
Change-Id: Iaa69d540dd7663355ceb66f6bc8ba0e5dd8c228e
CRs-Fixed: 2001611
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 2a8ae3ad5ece..e8ef3c6b27c7 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -8272,7 +8272,7 @@ int hdd_wlan_startup(struct device *dev) if (IS_ERR(adapter)) { hdd_alert("Failed to open interface, adapter is NULL"); ret = PTR_ERR(adapter); - goto err_ipa_cleanup; + goto err_release_rtnl_lock; } hif_sc = cds_get_context(QDF_MODULE_ID_HIF); @@ -8368,12 +8368,12 @@ err_debugfs_exit: hdd_debugfs_exit(adapter); err_close_adapter: - hdd_close_all_adapters(hdd_ctx, false); + hdd_close_all_adapters(hdd_ctx, rtnl_held); +err_release_rtnl_lock: if (rtnl_held) hdd_release_rtnl_lock(); -err_ipa_cleanup: hdd_ipa_cleanup(hdd_ctx); err_wiphy_unregister: |
