소스 검색

qcacld-3.0: fix invalid dp_soc use after free issue

driver module has been stopped since long time no interface is up
and dp_soc handle has been freed, but one virtual interface operation
still try to access invalid dp_soc from gp_cds_context, panic
happened.

set gp_cds_context->dp_soc to NULL if dp_soc is detached.

Change-Id: Icb2aa8bb15e309d8fcc749bafe37253c82a21f36
CRs-Fixed: 2413720
Jinwei Chen 6 년 전
부모
커밋
000e7f2413
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      core/cds/src/cds_api.c

+ 2 - 0
core/cds/src/cds_api.c

@@ -1144,6 +1144,8 @@ QDF_STATUS cds_close(struct wlan_objmgr_psoc *psoc)
 	gp_cds_context->mac_context = NULL;
 
 	cdp_soc_detach(gp_cds_context->dp_soc);
+	gp_cds_context->dp_soc = NULL;
+
 	ucfg_pmo_psoc_update_dp_handle(psoc, NULL);
 	wlan_psoc_set_dp_handle(psoc, NULL);