summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNitesh Shah <niteshs@codeaurora.org>2017-03-31 15:01:37 +0530
committerSandeep Puligilla <spuligil@codeaurora.org>2017-03-31 06:44:11 -0700
commit89c7def1a055b0990df1b7ff0bc0dab9335baf06 (patch)
treec3fb4b7777ada3b775a7dbbc5f2cf46ef85cef9c
parentff60fe6b4bb49e136f578e57669005ce215779ba (diff)
qcacld-3.0: Unlock tdls mutex properly in few instances
TDLS mutex is not unlocked properly in few error instances. Thus, the thread gets stuck. The fix is to unlock mutex properly before returning. Change-Id: Ic16015e568dd91af17b3bb1ba9b19722cb0f82d9 CRs-Fixed: 2026737
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c3
-rw-r--r--core/hdd/src/wlan_hdd_tdls.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 0c6ed9ab7d03..1d8849241e50 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -3726,7 +3726,8 @@ hdd_roam_tdls_status_update_handler(hdd_adapter_t *pAdapter,
hdd_roam_deregister_tdlssta
(pAdapter,
pRoamInfo->staId);
- }
+ } else
+ mutex_unlock(&pHddCtx->tdls_lock);
} else
mutex_unlock(&pHddCtx->tdls_lock);
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c
index 34f7c03df054..be0bb7aea9ea 100644
--- a/core/hdd/src/wlan_hdd_tdls.c
+++ b/core/hdd/src/wlan_hdd_tdls.c
@@ -437,12 +437,14 @@ static void wlan_hdd_tdls_discovery_timeout_peer_cb(void *userData)
pHddTdlsCtx = (tdlsCtx_t *) userData;
if ((NULL == pHddTdlsCtx) || (NULL == pHddTdlsCtx->pAdapter)) {
+ mutex_unlock(&pHddCtx->tdls_lock);
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
FL("pHddTdlsCtx or pAdapter points to NULL"));
return;
}
if (WLAN_HDD_ADAPTER_MAGIC != pHddTdlsCtx->pAdapter->magic) {
+ mutex_unlock(&pHddCtx->tdls_lock);
hdd_err("pAdapter has invalid magic");
return;
}
@@ -3838,7 +3840,7 @@ int wlan_hdd_tdls_add_station(struct wiphy *wiphy,
hdd_err(MAC_ADDRESS_STR " update %d not exist. return invalid",
MAC_ADDR_ARRAY(mac), update);
ret = -EINVAL;
- goto rel_lock;
+ goto ret_status;
}
link_status = pTdlsPeer->link_status;