]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tracing: Do not use PERF enums when perf is not defined
authorSteven Rostedt <rostedt@goodmis.org>
Sun, 23 Mar 2025 19:21:51 +0000 (15:21 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:32:07 +0000 (14:32 +0200)
commit35254cb9d115d4c8a72a20e67580f52aef4cbd14
tree374679a9df2a5391e1d54f5e6e0135269e525a3f
parent3e47f3a703c63aca1e1309f9d67c263303dddc34
tracing: Do not use PERF enums when perf is not defined

commit 8eb1518642738c6892bd629b46043513a3bf1a6a upstream.

An update was made to up the module ref count when a synthetic event is
registered for both trace and perf events. But if perf is not configured
in, the perf enums used will cause the kernel to fail to build.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Douglas Raillard <douglas.raillard@arm.com>
Link: https://lore.kernel.org/20250323152151.528b5ced@batman.local.home
Fixes: 21581dd4e7ff ("tracing: Ensure module defining synth event cannot be unloaded while tracing")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503232230.TeREVy8R-lkp@intel.com/
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace_events_synth.c