qcacmn: Statically allocate wlan logging buffer
To aid in debugging memory leaks, and improve the robustness of log recovery from crash dumps, statically allocate pglog_msg in the global scope. This allows logs to be inspected even in cases where a crash came late in the unload process. It also improves log recovery robustness by removing the possibility of using a NULL pointer offset under certain memory corruptions scenarios. Change-Id: I077198e358570661c2f3adf2704f2c48f4b2f6f8 CRs-Fixed: 2078548
This commit is contained in:
@@ -40,14 +40,14 @@
|
||||
|
||||
int wlan_logging_sock_init_svc(void);
|
||||
int wlan_logging_sock_deinit_svc(void);
|
||||
int wlan_logging_sock_activate_svc(int log_to_console, int num_buf);
|
||||
int wlan_logging_sock_deactivate_svc(void);
|
||||
int wlan_log_to_user(QDF_TRACE_LEVEL log_level, char *to_be_sent, int length);
|
||||
|
||||
#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
|
||||
void wlan_logging_set_per_pkt_stats(void);
|
||||
void wlan_logging_set_fw_flush_complete(void);
|
||||
void wlan_flush_host_logs_for_fatal(void);
|
||||
void wlan_logging_set_active(bool active);
|
||||
void wlan_logging_set_log_to_console(bool log_to_console);
|
||||
#else
|
||||
static inline void wlan_flush_host_logs_for_fatal(void)
|
||||
{
|
||||
@@ -58,6 +58,8 @@ static inline void wlan_logging_set_per_pkt_stats(void)
|
||||
static inline void wlan_logging_set_fw_flush_complete(void)
|
||||
{
|
||||
}
|
||||
void wlan_logging_set_active(bool active) {}
|
||||
void wlan_logging_set_log_to_console(bool log_to_console) {}
|
||||
#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
|
||||
|
||||
#ifdef FEATURE_WLAN_DIAG_SUPPORT
|
||||
|
Fai riferimento in un nuovo problema
Block a user