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
3207 char buffer[4][TRACE_BUF_SIZE];3207 char buffer[4][TRACE_BUF_SIZE];
3208};3208};
3209 3209
3210static struct trace_buffer_struct *trace_percpu_buffer;3210static struct trace_buffer_struct __percpu *trace_percpu_buffer;
3211 3211
3212/*3212/*
3213 * This allows for lockless recording. If we're nested too deeply, then3213 * 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
3217{3217{
3218 struct trace_buffer_struct *buffer = this_cpu_ptr(trace_percpu_buffer);3218 struct trace_buffer_struct *buffer = this_cpu_ptr(trace_percpu_buffer);
3219 3219
3220 if (!buffer || buffer->nesting >= 4)3220 if (!trace_percpu_buffer || buffer->nesting >= 4)
3221 return NULL;3221 return NULL;
3222 3222
3223 buffer->nesting++;3223 buffer->nesting++;
@@ -3236,7 +3236,7 @@ static void put_trace_buf(void) · 12 unmodified lines
3236 3236
3237static int alloc_percpu_trace_buffer(void)3237static int alloc_percpu_trace_buffer(void)
3238{3238{
3239 struct trace_buffer_struct *buffers;3239 struct trace_buffer_struct __percpu *buffers;
3240 3240
3241 if (trace_percpu_buffer)3241 if (trace_percpu_buffer)
3242 return 0;3242 return 0;