[PATCH] ath10k: change len of trace_ath10k_log_dbg_dump for large buffer size

Steven Rostedt rostedt at goodmis.org
Wed Feb 10 11:48:23 EST 2021


On Wed, 10 Feb 2021 11:30:26 -0500
Steven Rostedt <rostedt at goodmis.org> wrote:

> Can you test this patch?

v2:

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index b79bcacdd6f9..c5c3d826d420 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2739,7 +2739,7 @@ trace_event_buffer_lock_reserve(struct trace_buffer **current_rb,
 	    (entry = this_cpu_read(trace_buffered_event))) {
 		/* Try to use the per cpu buffer first */
 		val = this_cpu_inc_return(trace_buffered_event_cnt);
-		if (val == 1) {
+		if ((len < (PAGE_SIZE - sizeof(entry))) && val == 1) {
 			trace_event_setup(entry, type, trace_ctx);
 			entry->array[0] = len;
 			return entry;


-- Steve



More information about the ath10k mailing list