lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue,  9 Nov 2021 16:00:54 +0800
From:   Jian Wen <wenjianhn@...il.com>
To:     linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Jian Wen <wenjianhn@...il.com>
Subject: [PATCH] Fix usage of open()

O_NONBLOCK is a flag instead of a file mode bit.

Fixes: edcaa47958c7 ("perf daemon: Add 'ping' command")

Signed-off-by: Jian Wen <wenjianhn@...il.com>
---
 tools/perf/builtin-daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c
index 6cb3f6cc36d0..37d6fcdbb63d 100644
--- a/tools/perf/builtin-daemon.c
+++ b/tools/perf/builtin-daemon.c
@@ -531,7 +531,7 @@ static int daemon_session__control(struct daemon_session *session,
 		scnprintf(ack_path, sizeof(ack_path), "%s/%s",
 			  session->base, SESSION_ACK);
 
-		ack = open(ack_path, O_RDONLY, O_NONBLOCK);
+		ack = open(ack_path, O_RDONLY|O_NONBLOCK);
 		if (!ack) {
 			close(control);
 			return -1;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ