Skip to content

Commit 31bf4e7

Browse files
olsajiriacmel
authored andcommitted
perf daemon: Fix control fifo permissions
Add proper mode for mkfifo calls to get read and write permissions for user. We can't use O_RDWR in here, changing to standard permission value. Fixes: 6a6d180 ("perf daemon: Set control fifo for session") Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: John Garry <john.garry@huawei.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20210301122510.64402-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent dacfc08 commit 31bf4e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/perf/builtin-daemon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,12 @@ static int daemon_session__run(struct daemon_session *session,
373373
dup2(fd, 2);
374374
close(fd);
375375

376-
if (mkfifo(SESSION_CONTROL, O_RDWR) && errno != EEXIST) {
376+
if (mkfifo(SESSION_CONTROL, 0600) && errno != EEXIST) {
377377
perror("failed: create control fifo");
378378
return -1;
379379
}
380380

381-
if (mkfifo(SESSION_ACK, O_RDWR) && errno != EEXIST) {
381+
if (mkfifo(SESSION_ACK, 0600) && errno != EEXIST) {
382382
perror("failed: create ack fifo");
383383
return -1;
384384
}

0 commit comments

Comments
 (0)