Message ID | 20210408133431.2023697-3-rostedt@goodmis.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 85b62be4da5dad138a8c8a57648473d8ebc55e0c |
Headers | show |
Series | libtracefs: Update filtering functions | expand |
diff --git a/src/tracefs-tools.c b/src/tracefs-tools.c index cb07b6f..92e3f72 100644 --- a/src/tracefs-tools.c +++ b/src/tracefs-tools.c @@ -853,7 +853,7 @@ int tracefs_function_filter(struct tracefs_instance *instance, const char *filte open_flags = reset ? O_TRUNC : O_APPEND; if (*fd < 0) - *fd = open(ftrace_filter_path, O_WRONLY | open_flags); + *fd = open(ftrace_filter_path, O_WRONLY | O_CLOEXEC | open_flags); tracefs_put_tracing_file(ftrace_filter_path); if (*fd < 0) goto out_free;