From e03b460045fcdf82b384c74a537ff9ce9dac0302 Mon Sep 17 00:00:00 2001 From: Sachin Ahuja Date: Tue, 21 Jul 2020 21:34:02 +0530 Subject: [PATCH] qcacld-3.0: Flush the recovery work as a part of idle shutdown During idle shutdown(T1 Thread), Driver sends the PDEV suspend command to FW. If ACK is not received, driver initiates the work for self recovery. As a part of self recovery(T2 thread) driver allocates the memory and sends the force fw hang cmd and wait for the event. T1 thread continues and stop all the modules and check for mem leaks. Since t2 thread is not completed and free the memory, the crash happens as a part of mem leak check. Fix this race condition by cancelling and flushing the recovery work in cds close. CRs-Fixed: 2730021 Change-Id: Ieffff621e0838b341531c5b7feda1277ee4f70fd --- core/cds/src/cds_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index bdec2e01f29d..5e33cec7982c 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -1306,6 +1306,8 @@ QDF_STATUS cds_close(struct wlan_objmgr_psoc *psoc) dispatcher_psoc_close(psoc); + qdf_flush_work(&gp_cds_context->cds_recovery_work); + qdf_status = wma_wmi_work_close(); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { cds_err("Failed to close wma_wmi_work");