On Wed, Apr 09, 2025 at 09:06:43AM +0200, Jiri Slaby wrote:
On 08. 04. 25, 12:50, Greg Kroah-Hartman wrote:
6.14-stable review patch. If anyone has any objections, please let me know.
From: Douglas Raillard douglas.raillard@arm.com
commit 21581dd4e7ff6c07d0ab577e3c32b13a74b31522 upstream.
Currently, using synth_event_delete() will fail if the event is being used (tracing in progress), but that is normally done in the module exit function. At that stage, failing is problematic as returning a non-zero status means the module will become locked (impossible to unload or reload again).
Instead, ensure the module exit function does not get called in the first place by increasing the module refcnt when the event is enabled.
Cc: stable@vger.kernel.org Cc: Mathieu Desnoyers mathieu.desnoyers@efficios.com Fixes: 35ca5207c2d11 ("tracing: Add synthetic event command generation functions") Link: https://lore.kernel.org/20250318180906.226841-1-douglas.raillard@arm.com Signed-off-by: Douglas Raillard douglas.raillard@arm.com Acked-by: Masami Hiramatsu (Google) mhiramat@kernel.org Signed-off-by: Steven Rostedt (Google) rostedt@goodmis.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
kernel/trace/trace_events_synth.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-)
--- a/kernel/trace/trace_events_synth.c +++ b/kernel/trace/trace_events_synth.c @@ -852,6 +852,34 @@ static struct trace_event_fields synth_e {} }; +static int synth_event_reg(struct trace_event_call *call,
enum trace_reg type, void *data)
+{
- struct synth_event *event = container_of(call, struct synth_event, call);
- switch (type) {
- case TRACE_REG_REGISTER:
- case TRACE_REG_PERF_REGISTER:
Breaks build and needs: 8eb151864273 tracing: Do not use PERF enums when perf is not defined
Argh, my tools should have caught this, what went wrong... Ah, my fault, ugh, let me go find ALL of the "fixes for the fixes" that I missed for all of these releases...
thanks!
greg k-h