aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Yejian <[email protected]>2022-12-07 11:46:35 +0800
committerSteven Rostedt (Google) <[email protected]>2022-12-10 13:36:04 -0500
commit2cc6a528882d0e0ccbc1bca5f95b8c963cedac54 (patch)
treefc33e72f9f2e28cbfe15b9508fa5b3e41b67a269
parent20fb6c997600012209699564a79911584dd5876b (diff)
tracing/hist: Fix wrong return value in parse_action_params()
When number of synth fields is more than SYNTH_FIELDS_MAX, parse_action_params() should return -EINVAL. Link: https://lore.kernel.org/linux-trace-kernel/[email protected] Cc: <[email protected]> Cc: <[email protected]> Cc: [email protected] Fixes: c282a386a397 ("tracing: Add 'onmatch' hist trigger action support") Signed-off-by: Zheng Yejian <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
-rw-r--r--kernel/trace/trace_events_hist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index a0cd118af527..b4ad86c22b43 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -3609,6 +3609,7 @@ static int parse_action_params(struct trace_array *tr, char *params,
while (params) {
if (data->n_params >= SYNTH_FIELDS_MAX) {
hist_err(tr, HIST_ERR_TOO_MANY_PARAMS, 0);
+ ret = -EINVAL;
goto out;
}