mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
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
This commit is contained in:
parent
b90ab57f0c
commit
46bde3845d
1 changed files with 3 additions and 3 deletions
|
|
@ -8300,7 +8300,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);
|
||||
|
|
@ -8395,12 +8395,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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue