Skip to content

Commit 2cc6a52

Browse files
Zheng Yejianrostedt
authored andcommitted
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: c282a38 ("tracing: Add 'onmatch' hist trigger action support") Signed-off-by: Zheng Yejian <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 20fb6c9 commit 2cc6a52

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/trace/trace_events_hist.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3609,6 +3609,7 @@ static int parse_action_params(struct trace_array *tr, char *params,
36093609
while (params) {
36103610
if (data->n_params >= SYNTH_FIELDS_MAX) {
36113611
hist_err(tr, HIST_ERR_TOO_MANY_PARAMS, 0);
3612+
ret = -EINVAL;
36123613
goto out;
36133614
}
36143615

0 commit comments

Comments
 (0)