Преглед на файлове

qcacld-3.0: Vdev NULL Pointer access

Currently host driver accesses vdev without psoc
lock when it check for peer leak. There is a
possibility that when one thread tries to access
the peer leaks other thread deletes this vdev.
Similar issues are possible when driver checks for
vdev leak and pdev leak.

To address above issues, check objmgr leaks inside
psoc lock.

Change-Id: I83b7bb72508875b5e4b98ae050c9ce2af4ca56b3
CRs-Fixed: 3309498
Ashish Kumar Dhanotiya преди 2 години
родител
ревизия
f1141f815f
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      core/hdd/src/wlan_hdd_main.c

+ 3 - 0
core/hdd/src/wlan_hdd_main.c

@@ -3690,6 +3690,8 @@ static void hdd_check_for_objmgr_leaks(struct hdd_context *hdd_ctx)
 	if (!psoc)
 		return;
 
+	wlan_psoc_obj_lock(psoc);
+
 	hdd_check_for_objmgr_peer_leaks(psoc);
 
 	wlan_objmgr_for_each_psoc_vdev(psoc, vdev_id, vdev) {
@@ -3712,6 +3714,7 @@ static void hdd_check_for_objmgr_leaks(struct hdd_context *hdd_ctx)
 		wlan_objmgr_for_each_refs(ref_id_dbg, ref_id, refs)
 			wlan_objmgr_pdev_release_ref(pdev, ref_id);
 	}
+	wlan_psoc_obj_unlock(psoc);
 }
 
 static void hdd_check_for_leaks(struct hdd_context *hdd_ctx, bool is_ssr)