From 396b8e3cd84573cbe97ab867f86681849efb9510 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Sat, 18 Feb 2017 23:05:59 +0000 Subject: [PATCH] stress-iomix: fix mmap flags, should be PROT_READ | PROT_WRITE Signed-off-by: Colin Ian King --- stress-iomix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stress-iomix.c b/stress-iomix.c index b9dc21999..204c71fdb 100644 --- a/stress-iomix.c +++ b/stress-iomix.c @@ -504,7 +504,7 @@ int stress_iomix(const args_t *args) size_t i; int pids[SIZEOF_ARRAY(iomix_funcs)]; - counters = (void *)mmap(NULL, sz, PROT_WRITE | PROT_WRITE, + counters = (void *)mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); if (counters == MAP_FAILED) { pr_fail_dbg("mmap");