Nick Piggin f33ea7f404 [PATCH] fix get_user_pages bug
Checking pte_dirty instead of pte_write in __follow_page is problematic
for s390, and for copy_one_pte which leaves dirty when clearing write.

So revert __follow_page to check pte_write as before, and make
do_wp_page pass back a special extra VM_FAULT_WRITE bit to say it has
done its full job: once get_user_pages receives this value, it no longer
requires pte_write in __follow_page.

But most callers of handle_mm_fault, in the various architectures, have
switch statements which do not expect this new case.  To avoid changing
them all in a hurry, make an inline wrapper function (using the old
name) that masks off the new bit, and use the extended interface with
double underscores.

Yes, we do have a call to do_wp_page from do_swap_page, but no need to
change that: in rare case it's needed, another do_wp_page will follow.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
[ Cleanups by Nick Piggin ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-03 09:12:05 -07:00
..
2005-07-15 09:54:50 -07:00
2005-06-24 00:06:41 -07:00
2005-04-16 15:20:36 -07:00
2005-06-21 18:46:15 -07:00
2005-04-16 15:20:36 -07:00
2005-06-23 09:45:04 -07:00
2005-06-24 00:06:41 -07:00
2005-08-03 09:12:05 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-17 07:59:12 -07:00
2005-06-21 18:46:21 -07:00
2005-06-21 18:46:16 -07:00
2005-06-25 16:24:32 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-24 00:06:41 -07:00
2005-06-21 18:46:18 -07:00
2005-07-07 18:23:46 -07:00
2005-06-23 09:45:05 -07:00
2005-05-01 08:58:37 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00