From d3ecb6ac66ecd0fffb0690dfd0f8b162d8ccf073 Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Fri, 12 Jun 2015 14:33:53 -0700 Subject: qcacld-2.0: Validate the hdd context in __hdd_wmm_do_implicit_qos() To make the function __hdd_wmm_do_implicit_qos really SSR safe, we should extract the HDD context and validate it. Change-Id: I19c584f931eaf71f12aa15985f19a12019275b89 CRs-Fixed: 853747 --- CORE/HDD/src/wlan_hdd_wmm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CORE/HDD/src/wlan_hdd_wmm.c b/CORE/HDD/src/wlan_hdd_wmm.c index 429d0b7c76f6..7d59fe80795c 100644 --- a/CORE/HDD/src/wlan_hdd_wmm.c +++ b/CORE/HDD/src/wlan_hdd_wmm.c @@ -1251,6 +1251,7 @@ static void __hdd_wmm_do_implicit_qos(struct work_struct *work) sme_QosStatusType smeStatus; #endif sme_QosWmmTspecInfo qosInfo; + hdd_context_t *hdd_ctx; VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO_LOW, "%s: Entered, context %p", @@ -1265,6 +1266,13 @@ static void __hdd_wmm_do_implicit_qos(struct work_struct *work) } pAdapter = pQosContext->pAdapter; + + hdd_ctx = WLAN_HDD_GET_CTX(pAdapter); + if (0 != wlan_hdd_validate_context(hdd_ctx)) { + hddLog(LOGE, FL("HDD context is not valid")); + return; + } + acType = pQosContext->acType; pAc = &pAdapter->hddWmmStatus.wmmAcStatus[acType]; -- cgit v1.2.3