From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754706AbbINKxr (ORCPT ); Mon, 14 Sep 2015 06:53:47 -0400 Received: from foss.arm.com ([217.140.101.70]:45329 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752158AbbINKxq (ORCPT ); Mon, 14 Sep 2015 06:53:46 -0400 Date: Mon, 14 Sep 2015 11:53:46 +0100 From: Will Deacon To: kirill.shutemov@linux.intel.com Cc: oleg@redhat.com, hpa@zytor.com, luto@amacapital.net, dave.hansen@linux.intel.com, mingo@elte.hu, minchan@kernel.org, tglx@linutronix.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: LTP regressions due to 6dc296e7df4c ("mm: make sure all file VMAs have ->vm_ops set") Message-ID: <20150914105346.GB23878@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 #include #include #include #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; }