On Tue, Jan 30, 2007 at 03:21:19PM -0800, Andrew Morton wrote:
If you want to go down the path of carrying state around in task_struct,
you can take the mmap_sem and set a flag, then get_user_pages the source
page and lock both source and destination in ascending order, then your
page fault handler checks the flag and skips mmap_sem, and the rest of
your fault path checks both the page locks you're holding.
At which point you arrive at a horrible mess :)
-