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 <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ian Rogers <[email protected]> Cc: John Garry <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Michael Petlan <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
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

+2-2
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)