Make do_swap_page redo the fault It is better to redo the complete fault if do_swap_page() finds that the page is not in PageSwapCache() because the page migration code may have replaced the swap pte already with a pte pointing to valid memory. do_swap_page may interpret an invalid swap pte entry without this patch because we do not reload the pte if we are looping back. Signed-off-by: Christoph Lameter Index: linux-2.6.17-rc1/mm/memory.c =================================================================== --- linux-2.6.17-rc1.orig/mm/memory.c 2006-04-02 20:22:10.000000000 -0700 +++ linux-2.6.17-rc1/mm/memory.c 2006-04-03 22:22:56.000000000 -0700 @@ -1879,7 +1879,6 @@ static int do_swap_page(struct mm_struct goto out; entry = pte_to_swp_entry(orig_pte); -again: page = lookup_swap_cache(entry); if (!page) { swapin_readahead(entry, address, vma); @@ -1907,7 +1906,7 @@ again: /* Page migration has occured */ unlock_page(page); page_cache_release(page); - goto again; + goto out; } /*