summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandeep Puligilla <spuligil@codeaurora.org>2016-11-08 11:53:52 -0800
committerqcabuildsw <qcabuildsw@localhost>2016-11-09 17:23:31 -0800
commitc5632339f371d46a51737cccc5996bebef3e5d88 (patch)
tree8f1eab833ebe2f54facb02448a66947e19e3b805
parentab6c319337a3a32ebff8d70f579be38bf5b579b8 (diff)
qcacld-3.0: Validate session id in SME
As part of cds connection in progress validation check, CDS is accessing the session id from an adapter which is just created and initialized with an invalid sessionid. CDS passes the invalid session id to SME. SME is trying to access global structure with the same session id and triggered the crash. Add a session id validation check in SME before accessing the global mac structure. Change-Id: Ic0884b2121509807cabfc62b47238985c0e1356e CRs-fixed: 1087264
-rw-r--r--core/sme/src/common/sme_api.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 56e5c81b328f..0ec6694f53d9 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -14845,7 +14845,14 @@ QDF_STATUS sme_wifi_start_logger(tHalHandle hal,
*/
bool sme_neighbor_middle_of_roaming(tHalHandle hHal, uint8_t sessionId)
{
- return csr_neighbor_middle_of_roaming(PMAC_STRUCT(hHal), sessionId);
+ tpAniSirGlobal mac_ctx = PMAC_STRUCT(hHal);
+ bool val = false;
+
+ if (CSR_IS_SESSION_VALID(mac_ctx, sessionId))
+ val = csr_neighbor_middle_of_roaming(mac_ctx, sessionId);
+ else
+ sms_log(mac_ctx, LOGE, FL("Invalid Sesion = %d"), sessionId);
+ return val;
}
/*