Browse Source

qcacld-3.0: Fix flush uninitialized delay_work crash

With TDLS enabled and CONVERGED_TDLS_ENABLE defined, wlan_hdd_tdls_init()
will be bypassed by tdls_umac_comp_active flag.
While, in wlan_hdd_tdls_exit(), similar check missed, which causes
uninitialized delay_work be flushed. This leads to final crash.

Check tdls_umac_comp_active flag in begining of wlan_hdd_tdls_exit()
to avoid crash.

CRs-Fixed: 2087653
Change-Id: I0d9458683f092456e54ccf42988d4f8534922947
Lin Bai 7 years ago
parent
commit
28a4ca04e9
1 changed files with 4 additions and 1 deletions
  1. 4 1
      core/hdd/src/wlan_hdd_tdls.c

+ 4 - 1
core/hdd/src/wlan_hdd_tdls.c

@@ -712,7 +712,7 @@ void hdd_tdls_context_init(hdd_context_t *hdd_ctx, bool ssr)
 	if (!ssr)
 		hdd_ctx->tdls_external_peer_count = 0;
 
-	/* This flag will set  be true, only when device operates in
+	/* This flag will set be true, only when device operates in
 	 * standalone STA mode
 	 */
 	hdd_ctx->enable_tdls_connection_tracker = false;
@@ -882,6 +882,9 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter)
 		return;
 	}
 
+	if (pHddCtx->tdls_umac_comp_active)
+		return;
+
 	if (!test_bit(TDLS_INIT_DONE, &pAdapter->event_flags)) {
 		hdd_info("TDLS init was not done, exit");
 		return;