qcacld-3.0: Prevent null data access

qcacld-2.0 to qcacld-3.0 propagation

In DFS mode, scan req completed through work item
which is async method and may lead to null
pointer access during driver unload.
So as part of fix null check are put in place
to avoid null data access.

Change-Id: I1f2255c1ad6e3e881626a32384b9badde1b255fc
CRs-Fixed: 894741
这个提交包含在:
Mukul Sharma
2015-10-30 21:26:40 +05:30
提交者 Prakash Dhavali
父节点 bfd19ba1ee
当前提交 06adf26974

查看文件

@@ -1192,15 +1192,23 @@ static void wlan_hdd_cfg80211_scan_block_cb(struct work_struct *work)
{
hdd_adapter_t *adapter = container_of(work,
hdd_adapter_t, scan_block_work);
struct cfg80211_scan_request *request = adapter->request;
struct cfg80211_scan_request *request;
if (WLAN_HDD_ADAPTER_MAGIC != adapter->magic) {
hddLog(LOGE,
"%s: HDD adapter context is invalid", __func__);
return;
}
request->n_ssids = 0;
request->n_channels = 0;
request = adapter->request;
if (request) {
request->n_ssids = 0;
request->n_channels = 0;
hddLog(LOGE,
FL("##In DFS Master mode. Scan aborted. Null result sent"));
cfg80211_scan_done(request, true);
adapter->request = NULL;
hddLog(LOGE,
FL("##In DFS Master mode. Scan aborted. Null result sent"));
cfg80211_scan_done(request, true);
adapter->request = NULL;
}
}
/**