Browse Source

qcacld-3.0: Do NULL check on adapter->dev in hdd_lro_flush

Fix the issue due NULL pointer access on adapter->dev.
One of the instance this happened is inside __hdd_hostapd_uninit().

Change-Id: Ie2a3e41d446261cd32729b8eb8f12e23134a8828
CRs-Fixed: 1073808
Manjunathappa Prakash 8 năm trước cách đây
mục cha
commit
acf3561f35
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      core/hdd/src/wlan_hdd_lro.c

+ 3 - 1
core/hdd/src/wlan_hdd_lro.c

@@ -461,7 +461,9 @@ void hdd_lro_flush(void *data)
 	while (NULL != adapter_node && QDF_STATUS_SUCCESS == status) {
 		adapter = adapter_node->pAdapter;
 		hdd_lro = &adapter->lro_info;
-		if (adapter->dev->features & NETIF_F_LRO) {
+		if (adapter->dev == NULL) {
+			hdd_err("vdev interface going down");
+		} else if (adapter->dev->features & NETIF_F_LRO) {
 			qdf_spin_lock_bh(&hdd_lro->lro_mgr_arr_access_lock);
 			for (i = 0; i < hdd_lro->lro_mgr->max_desc; i++) {
 				if (hdd_lro->lro_mgr->lro_arr[i].active) {