tracing: eprobe: Remove duplicate is_good_name() operation
authorLinyu Yuan <quic_linyyuan@quicinc.com>
Mon, 27 Jun 2022 02:19:06 +0000 (10:19 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Sun, 24 Jul 2022 23:11:17 +0000 (19:11 -0400)
traceprobe_parse_event_name() already validate SYSTEM and EVENT name,
there is no need to call is_good_name() after it.

Link: https://lore.kernel.org/all/1656296348-16111-3-git-send-email-quic_linyyuan@quicinc.com/
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_eprobe.c

index b805b57..8979cb9 100644 (file)
@@ -887,8 +887,6 @@ static int __trace_eprobe_create(int argc, const char *argv[])
                                          sys_event - argv[1]);
        if (ret || !sys_name)
                goto parse_error;
-       if (!is_good_name(sys_event) || !is_good_name(sys_name))
-               goto parse_error;
 
        mutex_lock(&event_mutex);
        event_call = find_and_get_event(sys_name, sys_event);