diff options
| -rw-r--r-- | kernel/trace/trace.h | 2 | ||||
| -rw-r--r-- | kernel/trace/trace_events_filter.c | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index d2612016de94..3d2ad5f83e94 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
| @@ -1312,7 +1312,7 @@ void trace_event_init(void); | |||
| 1312 | void trace_event_enum_update(struct trace_enum_map **map, int len); | 1312 | void trace_event_enum_update(struct trace_enum_map **map, int len); |
| 1313 | #else | 1313 | #else |
| 1314 | static inline void __init trace_event_init(void) { } | 1314 | static inline void __init trace_event_init(void) { } |
| 1315 | static inlin void trace_event_enum_update(struct trace_enum_map **map, int len) { } | 1315 | static inline void trace_event_enum_update(struct trace_enum_map **map, int len) { } |
| 1316 | #endif | 1316 | #endif |
| 1317 | 1317 | ||
| 1318 | extern struct trace_iterator *tracepoint_print_iter; | 1318 | extern struct trace_iterator *tracepoint_print_iter; |
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 9d4a78f45dc4..1c92dfa1dd17 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c | |||
| @@ -1056,6 +1056,9 @@ static void parse_init(struct filter_parse_state *ps, | |||
| 1056 | 1056 | ||
| 1057 | static char infix_next(struct filter_parse_state *ps) | 1057 | static char infix_next(struct filter_parse_state *ps) |
| 1058 | { | 1058 | { |
| 1059 | if (!ps->infix.cnt) | ||
| 1060 | return 0; | ||
| 1061 | |||
| 1059 | ps->infix.cnt--; | 1062 | ps->infix.cnt--; |
| 1060 | 1063 | ||
| 1061 | return ps->infix.string[ps->infix.tail++]; | 1064 | return ps->infix.string[ps->infix.tail++]; |
| @@ -1071,6 +1074,9 @@ static char infix_peek(struct filter_parse_state *ps) | |||
| 1071 | 1074 | ||
| 1072 | static void infix_advance(struct filter_parse_state *ps) | 1075 | static void infix_advance(struct filter_parse_state *ps) |
| 1073 | { | 1076 | { |
| 1077 | if (!ps->infix.cnt) | ||
| 1078 | return; | ||
| 1079 | |||
| 1074 | ps->infix.cnt--; | 1080 | ps->infix.cnt--; |
| 1075 | ps->infix.tail++; | 1081 | ps->infix.tail++; |
| 1076 | } | 1082 | } |
| @@ -1385,7 +1391,9 @@ static int check_preds(struct filter_parse_state *ps) | |||
| 1385 | if (elt->op != OP_NOT) | 1391 | if (elt->op != OP_NOT) |
| 1386 | cnt--; | 1392 | cnt--; |
| 1387 | n_normal_preds++; | 1393 | n_normal_preds++; |
| 1388 | WARN_ON_ONCE(cnt < 0); | 1394 | /* all ops should have operands */ |
| 1395 | if (cnt < 0) | ||
| 1396 | break; | ||
| 1389 | } | 1397 | } |
| 1390 | 1398 | ||
| 1391 | if (cnt != 1 || !n_normal_preds || n_logical_preds >= n_normal_preds) { | 1399 | if (cnt != 1 || !n_normal_preds || n_logical_preds >= n_normal_preds) { |
