mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacmn: Disable bottom half in wmi show routine
We have a case in which user context was reading wmi debugfs entries and then an interrupt context waits on same lock resulting in deadlock and cpu stall. Disable bh to prevent cpu stall. Change-Id: I8e2b443317950b4cf2c8c228a98f638dd165ca2b
This commit is contained in:
parent
09e10eb5e2
commit
485478ae4e
1 changed files with 8 additions and 8 deletions
|
|
@ -1054,9 +1054,9 @@ wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count,
|
|||
int i; \
|
||||
uint64_t secs, usecs; \
|
||||
\
|
||||
qdf_spin_lock(&wmi_handle->log_info.wmi_record_lock); \
|
||||
qdf_spin_lock_bh(&wmi_handle->log_info.wmi_record_lock);\
|
||||
if (!wmi_log->length) { \
|
||||
qdf_spin_unlock(&wmi_handle->log_info.wmi_record_lock);\
|
||||
qdf_spin_unlock_bh(&wmi_handle->log_info.wmi_record_lock);\
|
||||
return wmi_bp_seq_printf(m, \
|
||||
"no elements to read from ring buffer!\n"); \
|
||||
} \
|
||||
|
|
@ -1073,7 +1073,7 @@ wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count,
|
|||
pos = *(wmi_log->p_buf_tail_idx) - 1; \
|
||||
\
|
||||
outlen = wmi_bp_seq_printf(m, "Length = %d\n", wmi_log->length);\
|
||||
qdf_spin_unlock(&wmi_handle->log_info.wmi_record_lock); \
|
||||
qdf_spin_unlock_bh(&wmi_handle->log_info.wmi_record_lock);\
|
||||
while (nread--) { \
|
||||
struct wmi_command_debug *wmi_record; \
|
||||
\
|
||||
|
|
@ -1112,9 +1112,9 @@ wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count,
|
|||
int i; \
|
||||
uint64_t secs, usecs; \
|
||||
\
|
||||
qdf_spin_lock(&wmi_handle->log_info.wmi_record_lock); \
|
||||
qdf_spin_lock_bh(&wmi_handle->log_info.wmi_record_lock);\
|
||||
if (!wmi_log->length) { \
|
||||
qdf_spin_unlock(&wmi_handle->log_info.wmi_record_lock);\
|
||||
qdf_spin_unlock_bh(&wmi_handle->log_info.wmi_record_lock);\
|
||||
return wmi_bp_seq_printf(m, \
|
||||
"no elements to read from ring buffer!\n"); \
|
||||
} \
|
||||
|
|
@ -1131,7 +1131,7 @@ wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count,
|
|||
pos = *(wmi_log->p_buf_tail_idx) - 1; \
|
||||
\
|
||||
outlen = wmi_bp_seq_printf(m, "Length = %d\n", wmi_log->length);\
|
||||
qdf_spin_unlock(&wmi_handle->log_info.wmi_record_lock); \
|
||||
qdf_spin_unlock_bh(&wmi_handle->log_info.wmi_record_lock);\
|
||||
while (nread--) { \
|
||||
struct wmi_event_debug *wmi_record; \
|
||||
\
|
||||
|
|
@ -1239,12 +1239,12 @@ static int debug_wmi_log_size_show(struct seq_file *m, void *v)
|
|||
return -EINVAL; \
|
||||
} \
|
||||
\
|
||||
qdf_spin_lock(&wmi_handle->log_info.wmi_record_lock); \
|
||||
qdf_spin_lock_bh(&wmi_handle->log_info.wmi_record_lock);\
|
||||
qdf_mem_zero(wmi_log->buf, wmi_ring_size * \
|
||||
sizeof(struct wmi_record_type)); \
|
||||
wmi_log->length = 0; \
|
||||
*(wmi_log->p_buf_tail_idx) = 0; \
|
||||
qdf_spin_unlock(&wmi_handle->log_info.wmi_record_lock); \
|
||||
qdf_spin_unlock_bh(&wmi_handle->log_info.wmi_record_lock);\
|
||||
\
|
||||
return count; \
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue