瀏覽代碼

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)