]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: React to error return from traceprobe_parse_event_name()
authorLukas Bulwahn <lukas.bulwahn@gmail.com>
Thu, 11 Aug 2022 07:17:34 +0000 (09:17 +0200)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Sun, 21 Aug 2022 19:56:07 +0000 (15:56 -0400)
commitc0e88bc0d623c95eb498d0a4b59200171c8a0c7d
tree2abe518ea9c8a5e7c1fb587ea2179fa22e371d9d
parentb14849254333c81d71035ab7dac73799f341df4b
tracing: React to error return from traceprobe_parse_event_name()

The function traceprobe_parse_event_name() may set the first two function
arguments to a non-null value and still return -EINVAL to indicate an
unsuccessful completion of the function. Hence, it is not sufficient to
just check the result of the two function arguments for being not null,
but the return value also needs to be checked.

Commit 0242126f03e5 ("tracing: Auto generate event name when creating a
group of events") changed the error-return-value checking of the second
traceprobe_parse_event_name() invocation in __trace_eprobe_create() and
removed checking the return value to jump to the error handling case.

Reinstate using the return value in the error-return-value checking.

Link: https://lkml.kernel.org/r/20220811071734.20700-1-lukas.bulwahn@gmail.com
Fixes: 0242126f03e5 ("tracing: Auto generate event name when creating a group of events")
Acked-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_eprobe.c