aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trace/ftrace.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/trace/ftrace.c b/trace/ftrace.c
index e953922f5b..3588bb0eb4 100644
--- a/trace/ftrace.c
+++ b/trace/ftrace.c
@@ -51,6 +51,12 @@ bool ftrace_init(void)
snprintf(path, PATH_MAX, "%s/tracing/tracing_on", debugfs);
trace_fd = open(path, O_WRONLY);
if (trace_fd < 0) {
+ if (errno == EACCES) {
+ trace_marker_fd = open("/dev/null", O_WRONLY);
+ if (trace_marker_fd != -1) {
+ return true;
+ }
+ }
perror("Could not open ftrace 'tracing_on' file");
return false;
} else {