[PATCH 03/21] mm: do_swap_page race major

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
---

 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux