From: Masami Hiramatsu (Google) <[email protected]> In parse_pred(), when the '~' operator is used with a 'within' filter, 'pos + i' points to the closing quote of the operand rather than to the unsupported '~' operator.
Pass 'pos + op_pos' so the error caret points to the invalid operator. Signed-off-by: Masami Hiramatsu (Google) <[email protected]> --- Changes in v4: - Drop Fixes and Cc: stable tags since this error position fix is a cleanup. Changes in v3: - Newly added to fix error position for within filter operator check. --- kernel/trace/trace_events_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 1a9a1cc8daa2..1a50de4e7e8d 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c @@ -2106,7 +2106,7 @@ static int parse_pred(const char *str, void *data, unsigned long func; if (op == OP_GLOB) { - parse_error(pe, FILT_ERR_GLOB_WITHIN, pos + i); + parse_error(pe, FILT_ERR_GLOB_WITHIN, pos + op_pos); goto err_free; }
