Revision 4ceb5db9757aaeadcf8fbbf97d76bd42aa4df0d6 authored by Linus Torvalds on 01 August 2005, 18:14:49 UTC, committed by Linus Torvalds on 01 August 2005, 18:14:49 UTC
There's no real guarantee that handle_mm_fault() will always be able to
break a COW situation - if an update from another thread ends up
modifying the page table some way, handle_mm_fault() may end up
requiring us to re-try the operation.

That's normally fine, but get_user_pages() ended up re-trying it as a
read, and thus a write access could in theory end up losing the dirty
bit or be done on a page that had not been properly COW'ed.

This makes get_user_pages() always retry write accesses as write
accesses by making "follow_page()" require that a writable follow has
the dirty bit set.  That simplifies the code and solves the race: if the
COW break fails for some reason, we'll just loop around and try again.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 8d894c4
History
File Mode Size
Kconfig -rw-r--r-- 17.4 KB
Makefile -rw-r--r-- 895 bytes
calibrate.c -rw-r--r-- 4.7 KB
do_mounts.c -rw-r--r-- 9.1 KB
do_mounts.h -rw-r--r-- 1.7 KB
do_mounts_devfs.c -rw-r--r-- 2.8 KB
do_mounts_initrd.c -rw-r--r-- 3.0 KB
do_mounts_md.c -rw-r--r-- 7.6 KB
do_mounts_rd.c -rw-r--r-- 10.0 KB
initramfs.c -rw-r--r-- 9.9 KB
main.c -rw-r--r-- 16.4 KB
version.c -rw-r--r-- 748 bytes

back to top