On 2015/10/17 18:48, Wang Nan wrote:

[SNIP]
event_bpf_file:
-PE_BPF_OBJECT
+PE_BPF_OBJECT event_bpf_config
  {
        struct parse_events_evlist *data = _data;
        struct parse_events_error *error = data->error;
        struct list_head *list;
ALLOC_LIST(list);
-       ABORT_ON(parse_events_load_bpf(data, list, $1, false));
+       ABORT_ON(parse_events_load_bpf(data, list, $1, false, $2));
+       parse_events__free_terms($2);

Here found a bug that $2 is possible to be NULL, but parse_events_free_terms
can't accept NULL param.

Will be fixed in next version.

Thank you.

        $$ = list;
  }
  |
-PE_BPF_SOURCE
+PE_BPF_SOURCE event_bpf_config
  {
        struct parse_events_evlist *data = _data;
        struct list_head *list;
ALLOC_LIST(list);
-       ABORT_ON(parse_events_load_bpf(data, list, $1, true));
+       ABORT_ON(parse_events_load_bpf(data, list, $1, true, $2));
+       parse_events__free_terms($2);
        $$ = list;
  }
+event_bpf_config:
+'/' event_config '/'
+{
+       $$ = $2;
+}
+|
+{
+       $$ = NULL;
+}
+
  start_terms: event_config
  {
        struct parse_events_terms *data = _data;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to