mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:24:45 +01:00
tracing: perf: Have perf tracepoint callbacks always disable preemption
In preparation to convert protection of tracepoints from being protected by a preempt disabled section to being protected by SRCU, have all the perf callbacks disable preemption as perf expects preemption to be disabled when processing tracepoints. While at it, convert the perf system call callback preempt_disable() to a guard(preempt). Link: https://lore.kernel.org/all/20250613152218.1924093-1-bigeasy@linutronix.de/ Link: https://patch.msgid.link/20260108220550.2f6638f3@fedora Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: "Paul E. McKenney" <paulmck@kernel.org> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260126231256.174621257@kernel.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
parent
84c2344b06
commit
16718274ee
1 changed files with 2 additions and 2 deletions
|
|
@ -71,6 +71,7 @@ perf_trace_##call(void *__data, proto) \
|
|||
u64 __count __attribute__((unused)); \
|
||||
struct task_struct *__task __attribute__((unused)); \
|
||||
\
|
||||
guard(preempt_notrace)(); \
|
||||
do_perf_trace_##call(__data, args); \
|
||||
}
|
||||
|
||||
|
|
@ -85,9 +86,8 @@ perf_trace_##call(void *__data, proto) \
|
|||
struct task_struct *__task __attribute__((unused)); \
|
||||
\
|
||||
might_fault(); \
|
||||
preempt_disable_notrace(); \
|
||||
guard(preempt_notrace)(); \
|
||||
do_perf_trace_##call(__data, args); \
|
||||
preempt_enable_notrace(); \
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue