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
Showing the changes to kernel (1 of 5 files). Show all
Unified · Split
| @@ -3207,7 +3207,7 @@ struct trace_buffer_struct { · 3206 unmodified lines | ||
| 3207 | 3207 | char buffer[4][TRACE_BUF_SIZE]; |
| 3208 | 3208 | }; |
| 3209 | 3209 | |
| 3210 | −static struct trace_buffer_struct *trace_percpu_buffer; | |
| 3210 | +static struct trace_buffer_struct __percpu *trace_percpu_buffer; | |
| 3211 | 3211 | |
| 3212 | 3212 | /* |
| 3213 | 3213 | * 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 | 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 | 3221 | return NULL; |
| 3222 | 3222 | |
| 3223 | 3223 | buffer->nesting++; |
| @@ -3236,7 +3236,7 @@ static void put_trace_buf(void) · 12 unmodified lines | ||
| 3236 | 3236 | |
| 3237 | 3237 | static int alloc_percpu_trace_buffer(void) |
| 3238 | 3238 | { |
| 3239 | − struct trace_buffer_struct *buffers; | |
| 3239 | + struct trace_buffer_struct __percpu *buffers; | |
| 3240 | 3240 | |
| 3241 | 3241 | if (trace_percpu_buffer) |
| 3242 | 3242 | return 0; |