--- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -5096,8 +5096,11 @@ int ftrace_regex_release(struct inode *i parser = &iter->parser; if (trace_parser_loaded(parser)) { + int enable = !(iter->flags & FTRACE_ITER_NOTRACE); + parser->buffer[parser->idx] = 0; - ftrace_match_records(iter->hash, parser->buffer, parser->idx); + ftrace_process_regex(iter, parser->buffer, + parser->idx, enable); } trace_parser_put(parser);