diff options
-rw-r--r-- | kernel/trace/trace_events_filter.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index e6a33db83856..ced69da0ff55 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c | |||
@@ -489,9 +489,10 @@ static int process_ops(struct filter_pred *preds, | |||
489 | if (!WARN_ON_ONCE(!pred->fn)) | 489 | if (!WARN_ON_ONCE(!pred->fn)) |
490 | match = pred->fn(pred, rec); | 490 | match = pred->fn(pred, rec); |
491 | if (!!match == type) | 491 | if (!!match == type) |
492 | return match; | 492 | break; |
493 | } | 493 | } |
494 | return match; | 494 | /* If not of not match is equal to not of not, then it is a match */ |
495 | return !!match == !op->not; | ||
495 | } | 496 | } |
496 | 497 | ||
497 | struct filter_match_preds_data { | 498 | struct filter_match_preds_data { |
@@ -740,10 +741,10 @@ static int filter_set_pred(struct event_filter *filter, | |||
740 | * then this op can be folded. | 741 | * then this op can be folded. |
741 | */ | 742 | */ |
742 | if (left->index & FILTER_PRED_FOLD && | 743 | if (left->index & FILTER_PRED_FOLD && |
743 | (left->op == dest->op || | 744 | ((left->op == dest->op && !left->not) || |
744 | left->left == FILTER_PRED_INVALID) && | 745 | left->left == FILTER_PRED_INVALID) && |
745 | right->index & FILTER_PRED_FOLD && | 746 | right->index & FILTER_PRED_FOLD && |
746 | (right->op == dest->op || | 747 | ((right->op == dest->op && !right->not) || |
747 | right->left == FILTER_PRED_INVALID)) | 748 | right->left == FILTER_PRED_INVALID)) |
748 | dest->index |= FILTER_PRED_FOLD; | 749 | dest->index |= FILTER_PRED_FOLD; |
749 | 750 | ||