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>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1441350045-25360-1-git-send-email-kenth.eriksson@transmode.com>
Date:	Fri,  4 Sep 2015 09:00:45 +0200
From:	Kenth Eriksson <kenth.eriksson@...nsmode.com>
To:	linux-kernel@...r.kernel.org, andi@...stfloor.org
Cc:	Kenth Eriksson <kenth.eriksson@...nsmode.com>
Subject: [PATCH] Fix mmap error for perf data file. Not all file systems, e.g. JFFS2, support MAP_SHARED.

Signed-off-by: Kenth Eriksson <kenth.eriksson@...nsmode.com>
---
 tools/perf/util/session.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 0c74012..c6617fe 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1338,11 +1338,10 @@ static int __perf_session__process_events(struct perf_session *session,
 	memset(mmaps, 0, sizeof(mmaps));
 
 	mmap_prot  = PROT_READ;
-	mmap_flags = MAP_SHARED;
+	mmap_flags = MAP_PRIVATE;
 
 	if (session->header.needs_swap) {
 		mmap_prot  |= PROT_WRITE;
-		mmap_flags = MAP_PRIVATE;
 	}
 remap:
 	buf = mmap(NULL, mmap_size, mmap_prot, mmap_flags, fd,
-- 
2.3.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ