aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_events_filter.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 1557148be34b..f32dc9d1ea7b 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -624,9 +624,6 @@ static int filter_add_subsystem_pred(struct filter_parse_state *ps,
624 return -ENOSPC; 624 return -ENOSPC;
625 } 625 }
626 626
627 filter->preds[filter->n_preds] = pred;
628 filter->n_preds++;
629
630 list_for_each_entry(call, &ftrace_events, list) { 627 list_for_each_entry(call, &ftrace_events, list) {
631 628
632 if (!call->define_fields) 629 if (!call->define_fields)
@@ -643,6 +640,9 @@ static int filter_add_subsystem_pred(struct filter_parse_state *ps,
643 } 640 }
644 replace_filter_string(call->filter, filter_string); 641 replace_filter_string(call->filter, filter_string);
645 } 642 }
643
644 filter->preds[filter->n_preds] = pred;
645 filter->n_preds++;
646out: 646out:
647 return err; 647 return err;
648} 648}
@@ -1034,9 +1034,12 @@ static int replace_preds(struct event_subsystem *system,
1034 if (call) { 1034 if (call) {
1035 err = filter_add_pred(ps, call, pred); 1035 err = filter_add_pred(ps, call, pred);
1036 filter_free_pred(pred); 1036 filter_free_pred(pred);
1037 } else 1037 } else {
1038 err = filter_add_subsystem_pred(ps, system, 1038 err = filter_add_subsystem_pred(ps, system,
1039 pred, filter_string); 1039 pred, filter_string);
1040 if (err)
1041 filter_free_pred(pred);
1042 }
1040 if (err) 1043 if (err)
1041 return err; 1044 return err;
1042 1045
@@ -1055,9 +1058,12 @@ static int replace_preds(struct event_subsystem *system,
1055 if (call) { 1058 if (call) {
1056 err = filter_add_pred(ps, call, pred); 1059 err = filter_add_pred(ps, call, pred);
1057 filter_free_pred(pred); 1060 filter_free_pred(pred);
1058 } else 1061 } else {
1059 err = filter_add_subsystem_pred(ps, system, pred, 1062 err = filter_add_subsystem_pred(ps, system, pred,
1060 filter_string); 1063 filter_string);
1064 if (err)
1065 filter_free_pred(pred);
1066 }
1061 if (err) 1067 if (err)
1062 return err; 1068 return err;
1063 1069