diff options
| author | Manikandan Mohan <manikand@codeaurora.org> | 2017-02-15 14:53:31 -0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-02-16 13:45:06 -0800 |
| commit | 0cdfdf4d6e4c7dbc36cb341e18e03989eb60d94e (patch) | |
| tree | 3e6f6bb769192d44b90ac9b8c13e2fbe725a73e3 | |
| parent | 05311e3ce3339909a8fe7505bd0fcd8c6b44af48 (diff) | |
qcacld-3.0: Check for HDD context validity
Check for HDD context validity for SAP Net dev stop ioctl to
resolve crash during SSR.
Change-Id: I09c57da5db4b072a8066f3c2b22c748cd79c293c
CRs-fixed: 2007350
| -rw-r--r-- | core/hdd/src/wlan_hdd_hostapd.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 33244a0bab62..01443fb67f76 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -303,13 +303,12 @@ static int __hdd_hostapd_stop(struct net_device *dev) hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev); hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter); ptSapContext sap_ctx = adapter->sessionCtx.ap.sapContext; + int ret; ENTER_DEV(dev); - - if (NULL == hdd_ctx) { - hdd_info("%pS HDD context is Null", (void *)_RET_IP_); - return -ENODEV; - } + ret = wlan_hdd_validate_context(hdd_ctx); + if (ret) + return ret; if (!sap_ctx) { hdd_err("invalid sap ctx : %p", sap_ctx); |
