Messages in this thread Patch in this message | | | Date | Thu, 13 Oct 2005 01:47:01 +0100 (BST) | From | Hugh Dickins <> | Subject | [PATCH 03/21] mm: do_swap_page race major |
| |
Small adjustment: do_swap_page should report its !pte_same race as a major fault if it had to read into swap cache, because whatever raced with it will have found page already in cache and reported minor fault.
Signed-off-by: Hugh Dickins <hugh@veritas.com> ---
mm/memory.c | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-)
--- mm02/mm/memory.c 2005-10-11 23:53:17.000000000 +0100 +++ mm03/mm/memory.c 2005-10-11 23:53:35.000000000 +0100 @@ -1728,10 +1728,8 @@ static int do_swap_page(struct mm_struct */ spin_lock(&mm->page_table_lock); page_table = pte_offset_map(pmd, address); - if (unlikely(!pte_same(*page_table, orig_pte))) { - ret = VM_FAULT_MINOR; + if (unlikely(!pte_same(*page_table, orig_pte))) goto out_nomap; - } if (unlikely(!PageUptodate(page))) { ret = VM_FAULT_SIGBUS; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |