mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacld-3.0: Fix race condition between scan and SSR/driver unload
HDD validate context check is at wrong place in __wlan_hdd_cfg80211_scan() which is leading to invalid pointer access and page fault. Move HDD validate context check at begining of scan API to avoid accessing any context pointer which is getting freed during SSR/driver unload. Change-Id: Id91c9ea54c513ecc25bdf42904a5bb5cde2e91ce CRs-Fixed: 1025498
This commit is contained in:
parent
24389de0b9
commit
46d26b7fcf
1 changed files with 5 additions and 4 deletions
|
|
@ -1271,6 +1271,11 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status)
|
||||
return status;
|
||||
|
||||
MTRACE(qdf_trace(QDF_MODULE_ID_HDD,
|
||||
TRACE_CODE_HDD_CFG80211_SCAN,
|
||||
pAdapter->sessionId, request->n_channels));
|
||||
|
|
@ -1282,10 +1287,6 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
|
|||
hdd_device_mode_to_string(pAdapter->device_mode),
|
||||
pAdapter->device_mode);
|
||||
|
||||
status = wlan_hdd_validate_context(pHddCtx);
|
||||
|
||||
if (0 != status)
|
||||
return status;
|
||||
|
||||
cfg_param = pHddCtx->config;
|
||||
pScanInfo = &pAdapter->scan_info;
|
||||
|
|
|
|||
Loading…
Reference in a new issue