]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic: add regression test for stale mmap reads
authorRoss Zwisler <ross.zwisler@linux.intel.com>
Wed, 26 Apr 2017 18:05:31 +0000 (12:05 -0600)
committerEryu Guan <eguan@redhat.com>
Thu, 27 Apr 2017 04:00:14 +0000 (12:00 +0800)
commitbba1b1b2b9370ba6b4aa690a5d53c57bee158324
treec3a4592d8d7c526417905d886a1cf27a360fe5f0
parentaccf20216c71af9d5c55933c899f68374afb86df
generic: add regression test for stale mmap reads

This adds a regression test for the following kernel patch:

  dax: fix data corruption due to stale mmap reads

The above patch fixes an issue where users of DAX can suffer data
corruption from stale mmap reads via the following sequence:

- open an mmap over a 2MiB hole

- read from a 2MiB hole, faulting in a 2MiB zero page

- write to the hole with write(3p).  The write succeeds but we incorrectly
  leave the 2MiB zero page mapping intact.

- via the mmap, read the data that was just written.  Since the zero page
  mapping is still intact we read back zeroes instead of the new data.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
.gitignore
src/Makefile
src/t_mmap_stale_pmd.c [new file with mode: 0644]
tests/generic/428 [new file with mode: 0755]
tests/generic/428.out [new file with mode: 0644]
tests/generic/group