Skip to content

fault vs truncate/invalidate race fix

Nick Piggin linux-fsdevel linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 80 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6mm: debug check for the fault vs invalidate racemm/filemap.c+2 -00 replies
2/6mm: simplify filemap_nopagemm/filemap.c+0 -240 replies
3/6mm: fix fault vs invalidate race for linear mappingsfs/gfs2/ops_file.c fs/ncpfs/mmap.c fs/ocfs2/mmap.c +7 more+113 -1144 replies
4/6mm: merge populate and nopage into fault (fixes nonlinear)Documentation/feature-removal-schedule.txt Documentation/filesystems/Locking fs/gfs2/ops_address.c +16 more+371 -26381 replies
5/6mm: merge nopfn into faultarch/powerpc/platforms/cell/spufs/file.c drivers/char/mspec.c include/linux/mm.h +1 more+71 -1141 reply
6/6mm: remove legacy cruftDocumentation/feature-removal-schedule.txt include/linux/mm.h mm/filemap.c +2 more+19 -3090 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/6] fault vs truncate/invalidate race fix

The following set of patches are based on current git.

These fix the fault vs invalidate and fault vs truncate_range race for filemap_nopage mappings, plus those and fault vs truncate race for nonlinear mappings.

These patches fix silent data corruption that we've had several people hitting in SUSE kernels. Our kernels have similar patches to lock the page over page fault, and no problem.

I've also got rid of the horrible populate API, and integrated nonlinear pages properly with the page fault path.

Downside is that this adds one more vector through which the buffered write deadlock can occur. However this is just a very tiny one (pte being unmapped for reclaim), compared to all the other ways that deadlock can occur (unmap, reclaim, truncate, invalidate). I doubt it will be noticable. At any rate, it is better than data corruption.

I hope these can get merged (at least into -mm) soon.

Thanks,
Nick

--
SuSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>