Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracing: Fix error handling in event_trigger_parse()

According to trigger_data_alloc() doc, trigger_data_free() should be
used to free an event_trigger_data object. This fixes a mismatch introduced
when kzalloc was replaced with trigger_data_alloc without updating
the corresponding deallocation calls.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Tom Zanussi <zanussi@kernel.org>
Link: https://lore.kernel.org/20250507145455.944453325@goodmis.org
Link: https://lore.kernel.org/20250318112737.4174-1-linmq006@gmail.com
Fixes: e1f187d09e11 ("tracing: Have existing event_command.parse() implementations use helpers")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
[ SDR: Changed event_trigger_alloc/free() to trigger_data_alloc/free() ]
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by

Miaoqian Lin and committed by
Steven Rostedt (Google)
c5dd28e7 f2947c4b

+2 -2
+2 -2
kernel/trace/trace_events_trigger.c
··· 995 995 996 996 if (remove) { 997 997 event_trigger_unregister(cmd_ops, file, glob+1, trigger_data); 998 - kfree(trigger_data); 998 + trigger_data_free(trigger_data); 999 999 ret = 0; 1000 1000 goto out; 1001 1001 } ··· 1022 1022 1023 1023 out_free: 1024 1024 event_trigger_reset_filter(cmd_ops, trigger_data); 1025 - kfree(trigger_data); 1025 + trigger_data_free(trigger_data); 1026 1026 goto out; 1027 1027 } 1028 1028