From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> Currently, if a field that is a long tries to match a field that is a pointer, tracefs_sqlhist() will fail with incompatible fields. But the kernel will still allow it to match, do not fail here. Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> --- src/tracefs-hist.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tracefs-hist.c b/src/tracefs-hist.c index 302b9a75e6ee..14988d8dc185 100644 --- a/src/tracefs-hist.c +++ b/src/tracefs-hist.c @@ -796,6 +796,7 @@ static bool verify_event_fields(struct tep_event *start_event, { const struct tep_format_field *start_field; const struct tep_format_field *end_field; + int start_flags, end_flags; if (!trace_verify_event_field(start_event, start_field_name, &start_field)) @@ -806,7 +807,11 @@ static bool verify_event_fields(struct tep_event *start_event, &end_field)) return false; - if (start_field->flags != end_field->flags || + /* A pointer can still match a long */ + start_flags = start_field->flags & ~TEP_FIELD_IS_POINTER; + end_flags = end_field->flags & ~TEP_FIELD_IS_POINTER; + + if (start_flags != end_flags || start_field->size != end_field->size) { errno = EBADE; return false; -- 2.35.1