mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-11 08:54:28 -05:00
89 lines
3.3 KiB
Diff
89 lines
3.3 KiB
Diff
|
From 4c9789ba9ed03adaa689d0831524ed6e5ca00fcd Mon Sep 17 00:00:00 2001
|
||
|
From: Vinay Krishna Eranna <c_veran@qti.qualcomm.com>
|
||
|
Date: Mon, 21 Apr 2014 20:17:57 +0530
|
||
|
Subject: wlan: Avoid abort due to access of deinitialised socket
|
||
|
|
||
|
If driver initialization fails after nl initialization,
|
||
|
driver tries to stop PE by posting the message to MC
|
||
|
thread which in turn tries to send a message to the
|
||
|
ptt App, by this time the socket would have been
|
||
|
de-initialized due to which abort occurs.
|
||
|
|
||
|
Avoid sending any message during load unload in progress.
|
||
|
Reduce the min number of logging buffers to support low
|
||
|
memory devices and use vmalloc instead for logging buffer
|
||
|
allocation.
|
||
|
|
||
|
Change-Id: Ifdcd6ef0d92f0a68d03193070057a67818371674
|
||
|
CRs-Fixed: 652067
|
||
|
---
|
||
|
CORE/HDD/inc/wlan_hdd_cfg.h | 2 +-
|
||
|
CORE/SVC/src/logging/wlan_logging_sock_svc.c | 5 +++--
|
||
|
CORE/VOSS/src/vos_diag.c | 7 +++++++
|
||
|
3 files changed, 11 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
|
||
|
index 6451154..ea5e05d 100644
|
||
|
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
|
||
|
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
|
||
|
@@ -2067,7 +2067,7 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
|
||
|
|
||
|
//Number of buffers to be used for WLAN logging
|
||
|
#define CFG_WLAN_LOGGING_NUM_BUF_NAME "wlanLoggingNumBuf"
|
||
|
-#define CFG_WLAN_LOGGING_NUM_BUF_MIN ( 8 )
|
||
|
+#define CFG_WLAN_LOGGING_NUM_BUF_MIN ( 4 )
|
||
|
#define CFG_WLAN_LOGGING_NUM_BUF_MAX ( 64 )
|
||
|
#define CFG_WLAN_LOGGING_NUM_BUF_DEFAULT ( 32 )
|
||
|
#endif //WLAN_LOGGING_SOCK_SVC_ENABLE
|
||
|
diff --git a/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
|
||
|
index 9ac2201..4b78a0d 100644
|
||
|
--- a/CORE/SVC/src/logging/wlan_logging_sock_svc.c
|
||
|
+++ b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
|
||
|
@@ -30,6 +30,7 @@
|
||
|
*
|
||
|
******************************************************************************/
|
||
|
#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
|
||
|
+#include <vmalloc.h>
|
||
|
#include <wlan_nlink_srv.h>
|
||
|
#include <vos_status.h>
|
||
|
#include <vos_trace.h>
|
||
|
@@ -487,7 +488,7 @@ int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf)
|
||
|
|
||
|
gapp_pid = INVALID_PID;
|
||
|
|
||
|
- gplog_msg = (struct log_msg *) vos_mem_malloc(
|
||
|
+ gplog_msg = (struct log_msg *) vmalloc(
|
||
|
num_buf * sizeof(struct log_msg));
|
||
|
if (!gplog_msg) {
|
||
|
pr_err("%s: Could not allocate memory\n", __func__);
|
||
|
@@ -545,7 +546,7 @@ int wlan_logging_sock_deactivate_svc(void)
|
||
|
wake_up_interruptible(&gwlan_logging.wait_queue);
|
||
|
wait_for_completion_interruptible(&gwlan_logging.shutdown_comp);
|
||
|
|
||
|
- vos_mem_free(gplog_msg);
|
||
|
+ vfree(gplog_msg);
|
||
|
|
||
|
pr_info("%s: Deactivate wlan_logging svc\n", __func__);
|
||
|
|
||
|
diff --git a/CORE/VOSS/src/vos_diag.c b/CORE/VOSS/src/vos_diag.c
|
||
|
index 5b1dfde..06be463 100644
|
||
|
--- a/CORE/VOSS/src/vos_diag.c
|
||
|
+++ b/CORE/VOSS/src/vos_diag.c
|
||
|
@@ -131,6 +131,13 @@ void vos_log_submit(v_VOID_t *plog_hdr_ptr)
|
||
|
/*Get the Hdd Context */
|
||
|
pHddCtx = ((VosContextType*)(pVosContext))->pHDDContext;
|
||
|
|
||
|
+ if (WLAN_HDD_IS_LOAD_UNLOAD_IN_PROGRESS(pHddCtx))
|
||
|
+ {
|
||
|
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
|
||
|
+ "%s: Unloading/Loading in Progress. Ignore!!!", __func__);
|
||
|
+ return;
|
||
|
+ }
|
||
|
+
|
||
|
#ifdef WLAN_KD_READY_NOTIFIER
|
||
|
/* NL is not ready yet, WLAN KO started first */
|
||
|
if ((pHddCtx->kd_nl_init) && (!pHddCtx->ptt_pid))
|
||
|
--
|
||
|
cgit v1.1
|
||
|
|