Named triggers must also have the same set of variables in order to be
considered compatible - update the trigger match test to account for
that.
The reason for this requirement is that named triggers with variables
are meant to allow one or more events to set the same variable.
Signed-off-by: Tom Zanussi <[email protected]>
---
kernel/trace/trace_events_hist.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index a7eb162..24a2b69 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -1605,7 +1605,7 @@ static int event_hist_trigger_print(struct seq_file *m,
sort_key = &hist_data->sort_keys[i];
idx = sort_key->field_idx;
- if (WARN_ON(idx >= TRACING_MAP_FIELDS_MAX))
+ if (WARN_ON(idx >= HIST_FIELDS_MAX))
return -EINVAL;
if (i > 0)
@@ -1793,6 +1793,11 @@ static bool hist_trigger_match(struct event_trigger_data *data,
return false;
if (key_field->is_signed != key_field_test->is_signed)
return false;
+ if (!!key_field->var.name != !!key_field_test->var.name)
+ return false;
+ if (key_field->var.name &&
+ strcmp(key_field->var.name, key_field_test->var.name) != 0)
+ return false;
}
for (i = 0; i < hist_data->n_sort_keys; i++) {
--
1.9.3
From 1583622747295743993@xxx Thu Nov 09 20:45:40 +0000 2017
X-GM-THRID: 1583622747295743993
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread