aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r--tools/perf/builtin-annotate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 4ac618b34254..4c7bc4436236 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -984,8 +984,8 @@ static int __cmd_annotate(void)
984 exit(-1); 984 exit(-1);
985 } 985 }
986 986
987 if (!force && (input_stat.st_uid != geteuid())) { 987 if (!force && input_stat.st_uid && (input_stat.st_uid != geteuid())) {
988 fprintf(stderr, "file: %s not owned by current user\n", input_name); 988 fprintf(stderr, "file: %s not owned by current user or root\n", input_name);
989 exit(-1); 989 exit(-1);
990 } 990 }
991 991