summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasti, Narayanraddi <c_nmasti@qti.qualcomm.com>2014-10-30 15:34:50 +0530
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2014-11-03 16:21:13 +0530
commitbc503dd9b5eae37a66188ca2cb1afc80dc80a472 (patch)
tree5295cb573e886cf7615ddd7b76d6c315e69841c6
parent8cf9941f38cb50efcc3ad94caa8d481fc5689cac (diff)
qcacld: Make sure logging thread exits safely
Make sure logging thread exits before releasing the allocated buffer for logging and the link list modification,during logging service deactivation. This done by using wait_for_completion instead of wait_for_completion_interruptible. Change-Id: Ibfd4be99807c1988fac5c0863a70edd2e2ca29d7 CRs-Fixed: 747516
-rw-r--r--CORE/SVC/src/logging/wlan_logging_sock_svc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
index bdfb28fb2275..f8e77ce2549b 100644
--- a/CORE/SVC/src/logging/wlan_logging_sock_svc.c
+++ b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
@@ -514,10 +514,10 @@ static int wlan_logging_thread(void *Arg)
}
}
- complete_and_exit(&gwlan_logging.shutdown_comp, 0);
-
pr_info("%s: Terminating\n", __func__);
+ complete_and_exit(&gwlan_logging.shutdown_comp, 0);
+
return 0;
}
@@ -643,10 +643,10 @@ int wlan_logging_sock_deactivate_svc(void)
clear_default_logtoapp_log_level();
gapp_pid = INVALID_PID;
- gwlan_logging.exit = true;
INIT_COMPLETION(gwlan_logging.shutdown_comp);
+ gwlan_logging.exit = true;
wake_up_interruptible(&gwlan_logging.wait_queue);
- wait_for_completion_interruptible(&gwlan_logging.shutdown_comp);
+ wait_for_completion(&gwlan_logging.shutdown_comp);
spin_lock_irqsave(&gwlan_logging.spin_lock, irq_flag);
vfree(gplog_msg);