tracing: Have trigger filter parsing errors show up in error_log

It is annoying that the filter parsing of triggers do not show up in the
error_log. Trying to figure out what is incorrect in the input is
difficult when it fails for a typo.

Have the errors of filter parsing show up in error_log as well.

Link: https://lore.kernel.org/linux-trace-kernel/20221213095602.083fa9fd@gandalf.local.home

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent 3e127583
...@@ -1067,7 +1067,14 @@ int set_trigger_filter(char *filter_str, ...@@ -1067,7 +1067,14 @@ int set_trigger_filter(char *filter_str,
/* The filter is for the 'trigger' event, not the triggered event */ /* The filter is for the 'trigger' event, not the triggered event */
ret = create_event_filter(file->tr, file->event_call, ret = create_event_filter(file->tr, file->event_call,
filter_str, false, &filter); filter_str, true, &filter);
/* Only enabled set_str for error handling */
if (filter) {
kfree(filter->filter_string);
filter->filter_string = NULL;
}
/* /*
* If create_event_filter() fails, filter still needs to be freed. * If create_event_filter() fails, filter still needs to be freed.
* Which the calling code will do with data->filter. * Which the calling code will do with data->filter.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment