From 709a636c8a3d4c4fa4f2d644cad7ad665e7425ca Mon Sep 17 00:00:00 2001 From: Hanumanth Reddy Pothula Date: Tue, 18 Oct 2016 18:19:44 +0530 Subject: [PATCH] qcacld-3.0: Un-initialize modules after closing cds schedulers During driver un-initialization, cds scheduler is closed after un-initializing lower layer modules. This may lead to crash as there is possibility of MC thread to process commands after lower layer objects are uninitialized/freed. Un-initialize lower layer modules after closing cds schedulers. Change-Id: Ia43ca4f95c5b40aeb14976b523008e650ba26e10 CRs-Fixed: 1079196 --- core/hdd/src/wlan_hdd_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index d092dd8b55e3..9326fd93492c 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -4873,7 +4873,6 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx) hdd_stop_all_adapters(hdd_ctx); } - hdd_wlan_stop_modules(hdd_ctx); /* * Close the scheduler before calling cds_close to make sure no thread * is scheduled after the each module close is called i.e after all the @@ -4885,6 +4884,8 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx) QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status)); } + hdd_wlan_stop_modules(hdd_ctx); + qdf_spinlock_destroy(&hdd_ctx->hdd_adapter_lock); qdf_spinlock_destroy(&hdd_ctx->sta_update_info_lock); qdf_spinlock_destroy(&hdd_ctx->connection_status_lock);