diff options
| author | Srinivas Girigowda <sgirigow@qca.qualcomm.com> | 2014-04-04 10:38:19 -0700 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-04-08 16:51:17 -0700 |
| commit | 348f45287fb10bac27799dfab743034196bc10a4 (patch) | |
| tree | 7984ec03bdf4a7f86661ede37fd885a8c2f7c69e | |
| parent | 3415bb9efcb54add4f3932a40295d29b8e6028eb (diff) | |
qcacld: HDD: add logpinprogress check for ioctl calls
Add logpinprogress check to prevent powerstate
change during loading through wlan_hdd_enter_bmps.
This helps to prevent access to any uninitialized null pointer
during loading stage of driver.
Change-Id: I0d3285a468b1b79731c0a1d60bf82d1f74f984d6
CRs-Fixed: 643824
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_wext.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c index 7f84de4aaf17..a110cdef89db 100644 --- a/CORE/HDD/src/wlan_hdd_wext.c +++ b/CORE/HDD/src/wlan_hdd_wext.c @@ -3040,6 +3040,12 @@ VOS_STATUS wlan_hdd_enter_bmps(hdd_adapter_t *pAdapter, int mode) hddLog(VOS_TRACE_LEVEL_INFO_HIGH, "power mode=%d", mode); pHddCtx = WLAN_HDD_GET_CTX(pAdapter); + if (pHddCtx->isLogpInProgress) { + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, + "%s:LOGP in Progress. Ignore!!!", __func__); + return VOS_STATUS_E_FAILURE; + } + init_completion(&context.completion); context.pAdapter = pAdapter; |
