History

Merge tag 'trace-v5.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt: "Three minor tracing fixes: - Fix missing prototypes in sample module for direct functions - Fix check of valid buffer in get_trace_buf() - Fix annotations of percpu pointers" * tag 'trace-v5.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Tag trace_percpu_buffer as a percpu pointer tracing: Fix check for trace_percpu_buffer validity in get_trace_buf() ftrace/samples: Add missing prototypes direct functions

Linus Torvalds committed 4 years ago

Commit b2b436e2 parents 75acfdb f28439d5 files · +14 −3Browse files

Showing the changes to kernel (1 of 5 files). Show all

Unified · Split

kernel/trace/trace.c+3−3
@@ -3207,7 +3207,7 @@ struct trace_buffer_struct { · 3206 unmodified lines
32073207 char buffer[4][TRACE_BUF_SIZE];
32083208 };
32093209
3210−static struct trace_buffer_struct *trace_percpu_buffer;
3210+static struct trace_buffer_struct __percpu *trace_percpu_buffer;
32113211
32123212 /*
32133213 * This allows for lockless recording. If we're nested too deeply, then
@@ -3217,7 +3217,7 @@ static char *get_trace_buf(void) · 3 unmodified lines
32173217 {
32183218 struct trace_buffer_struct *buffer = this_cpu_ptr(trace_percpu_buffer);
32193219
3220− if (!buffer || buffer->nesting >= 4)
3220+ if (!trace_percpu_buffer || buffer->nesting >= 4)
32213221 return NULL;
32223222
32233223 buffer->nesting++;
@@ -3236,7 +3236,7 @@ static void put_trace_buf(void) · 12 unmodified lines
32363236
32373237 static int alloc_percpu_trace_buffer(void)
32383238 {
3239− struct trace_buffer_struct *buffers;
3239+ struct trace_buffer_struct __percpu *buffers;
32403240
32413241 if (trace_percpu_buffer)
32423242 return 0;