From 28a4ca04e9b20d51363565378fd66ad68e320259 Mon Sep 17 00:00:00 2001 From: Lin Bai Date: Fri, 4 Aug 2017 16:25:48 +0800 Subject: [PATCH] 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 --- core/hdd/src/wlan_hdd_tdls.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index 8ebdf526861e..d284ed024c44 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/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;