summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2021-11-29 21:39:46 -0500
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-12-06 15:37:22 -0500
commite07a1d576239cf836070e740d4bd7c5e8a64868f (patch)
treece3aa255c147c51f1cf2382c7f36109df87ea36d /kernel
parent7c689c839734a23eda855e69a56ed4795533bf71 (diff)
downloadlinux-stable-e07a1d576239cf836070e740d4bd7c5e8a64868f.tar.gz
linux-stable-e07a1d576239cf836070e740d4bd7c5e8a64868f.tar.bz2
linux-stable-e07a1d576239cf836070e740d4bd7c5e8a64868f.zip
tracing: Use __this_cpu_read() in trace_event_buffer_lock_reserver()
The value read by this_cpu_read() is used later and its use is expected to stay on the same CPU as being read. But this_cpu_read() does not warn if it is called without preemption disabled, where as __this_cpu_read() will check if preemption is disabled on CONFIG_DEBUG_PREEMPT Currently all callers have preemption disabled, but there may be new callers in the future that may not. Link: https://lkml.kernel.org/r/20211130024318.698165354@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 4821fe6a40a5..2e87b7bf2ba7 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2746,7 +2746,7 @@ trace_event_buffer_lock_reserve(struct trace_buffer **current_rb,
if (!tr->no_filter_buffering_ref &&
(trace_file->flags & (EVENT_FILE_FL_SOFT_DISABLED | EVENT_FILE_FL_FILTERED)) &&
- (entry = this_cpu_read(trace_buffered_event))) {
+ (entry = __this_cpu_read(trace_buffered_event))) {
/*
* Filtering is on, so try to use the per cpu buffer first.
* This buffer will simulate a ring_buffer_event,