summaryrefslogtreecommitdiffstats
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2015-09-08 14:59:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-08 15:35:28 -0700
commit843172978bb92997310d2f7fbc172ece423cfc02 (patch)
tree3dd6214e78238293b1ac4612e7fc35775b567da0 /mm/huge_memory.c
parent01a33b4ace68bc35679a347f21d5ed6e222e30dc (diff)
downloadlinux-stable-843172978bb92997310d2f7fbc172ece423cfc02.tar.gz
linux-stable-843172978bb92997310d2f7fbc172ece423cfc02.tar.bz2
linux-stable-843172978bb92997310d2f7fbc172ece423cfc02.zip
dax: fix race between simultaneous faults
If two threads write-fault on the same hole at the same time, the winner of the race will return to userspace and complete their store, only to have the loser overwrite their store with zeroes. Fix this for now by taking the i_mmap_sem for write instead of read, and do so outside the call to get_block(). Now the loser of the race will see the block has already been zeroed, and will not zero it again. This severely limits our scalability. I have ideas for improving it, but those can wait for a later patch. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
0 files changed, 0 insertions, 0 deletions