]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tracing: eprobe: Add missing log index
authorLinyu Yuan <quic_linyyuan@quicinc.com>
Mon, 27 Jun 2022 02:19:05 +0000 (10:19 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Sun, 24 Jul 2022 23:11:17 +0000 (19:11 -0400)
Add trace_probe_log_set_index(1) to allow report correct error
if user input wrong SYSTEM.EVENT format.

Link: https://lore.kernel.org/all/1656296348-16111-2-git-send-email-quic_linyyuan@quicinc.com/
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 7d4478525c66965ff7c497904a569c73dec61355..b805b570305fc51a52dd63defa72c328cbd336e5 100644 (file)
@@ -881,6 +881,7 @@ static int __trace_eprobe_create(int argc, const char *argv[])
        if (!is_good_name(event) || !is_good_name(group))
                goto parse_error;
 
+       trace_probe_log_set_index(1);
        sys_event = argv[1];
        ret = traceprobe_parse_event_name(&sys_event, &sys_name, buf2,
                                          sys_event - argv[1]);