[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150914105346.GB23878@arm.com>
Date: Mon, 14 Sep 2015 11:53:46 +0100
From: Will Deacon <will.deacon@....com>
To: kirill.shutemov@...ux.intel.com
Cc: oleg@...hat.com, hpa@...or.com, luto@...capital.net,
dave.hansen@...ux.intel.com, mingo@...e.hu, minchan@...nel.org,
tglx@...utronix.de, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: LTP regressions due to 6dc296e7df4c ("mm: make sure all file VMAs
have ->vm_ops set")
Hi Kirill,
Your patch 6dc296e7df4c ("mm: make sure all file VMAs have ->vm_ops set")
causes some mmap regressions in LTP, which appears to use a MAP_PRIVATE
mmap of /dev/zero as a way to get anonymous pages in some of its tests
(specifically mmap10 [1]).
Dead simple reproducer below. Is this change in behaviour intentional?
Will
[1]
http://sourceforge.net/p/ltp/git/ci/1eb440c2b5fe43a3e5023015a16aa5d7d3385b1e/tree/testcases/kernel/syscalls/mmap/mmap10.c
--->8
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#define MAP_SZ 5*1024*1024
int main(void)
{
char *foo;
int fd;
fd = open("/dev/zero", O_RDWR, 0666);
if (fd < 0) {
perror(NULL);
return fd;
}
foo = mmap(NULL, MAP_SZ, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
if (foo == MAP_FAILED) {
perror(NULL);
return -1;
}
foo[MAP_SZ >> 1] = 0; // Generates SIGBUS with 4.3-rc1
return 0;
}
--
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