2022-06-27 02:21:58

by Linyu Yuan

[permalink] [raw]
Subject: [PATCH v7 1/4] tracing: eprobe: add missing log index

Add trace_probe_log_set_index(1) to allow report correct error
if user input wrong SYSTEM.EVENT format.

Signed-off-by: Linyu Yuan <[email protected]>
---
v7: move one line change from v6 to a separate patch

kernel/trace/trace_eprobe.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/trace/trace_eprobe.c b/kernel/trace/trace_eprobe.c
index 7d44785..b805b57 100644
--- a/kernel/trace/trace_eprobe.c
+++ b/kernel/trace/trace_eprobe.c
@@ -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]);
--
2.7.4