From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 26 Apr 2017 12:00:21 -0600 From: Ross Zwisler To: Xiong Zhou Cc: Ross Zwisler , fstests@vger.kernel.org, jmoyer@redhat.com, eguan@redhat.com, Christoph Hellwig , Dan Williams , "Darrick J. Wong" , Jan Kara , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, Andrew Morton Subject: Re: [PATCH v2 2/2] dax: add regression test for stale mmap reads Message-ID: <20170426180021.GB15921@linux.intel.com> References: <20170425205106.20576-1-ross.zwisler@linux.intel.com> <20170425205106.20576-2-ross.zwisler@linux.intel.com> <20170426090907.q5jj3ywsvldsbq7n@XZHOUW.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170426090907.q5jj3ywsvldsbq7n@XZHOUW.usersys.redhat.com> Sender: owner-linux-mm@kvack.org List-ID: On Wed, Apr 26, 2017 at 05:09:07PM +0800, Xiong Zhou wrote: > On Tue, Apr 25, 2017 at 02:51:06PM -0600, Ross Zwisler wrote: <> > > + /* > > + * Try and use the mmap to read back the data we just wrote with > > + * pwrite(). If the kernel bug is present the mapping from the 2MiB > > + * zero page will still be intact, and we'll read back zeros instead. > > + */ > > + if (strncmp(buffer, data, strlen(buffer))) { > > + fprintf(stderr, "strncmp mismatch: '%s' vs '%s'\n", buffer, > > + data); > munmap > close(fd); > > + exit(1); > > + } > > + > munmap Yep, thanks, fixed in v3. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org