tracing: Use __this_cpu_read() in trace_event_buffer_lock_reserver()
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 30 Nov 2021 02:39:46 +0000 (21:39 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 6 Dec 2021 20:37:22 +0000 (15:37 -0500)
commite07a1d576239cf836070e740d4bd7c5e8a64868f
treece3aa255c147c51f1cf2382c7f36109df87ea36d
parent7c689c839734a23eda855e69a56ed4795533bf71
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>
kernel/trace/trace.c