On Wed, 10 Feb 2021 11:48:23 -0500 Steven Rostedt <rostedt@xxxxxxxxxxx> wrote: > On Wed, 10 Feb 2021 11:30:26 -0500 > Steven Rostedt <rostedt@xxxxxxxxxxx> wrote: > > > Can you test this patch? > > v2: Bah! v3: diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index b79bcacdd6f9..90d7ade03499 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;