From: Zachary Amsden Date: Sun, 1 Oct 2006 06:29:30 +0000 (-0700) Subject: [PATCH] paravirt: remove read hazard from cow X-Git-Tag: v2.6.19-rc1~501 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dc907951446b9317b1887223caa4e083390de9f;p=linux-2.6 [PATCH] paravirt: remove read hazard from cow We don't want to read PTEs directly like this after they have been modified, as a lazy MMU implementation of direct page tables may not have written the updated PTE back to memory yet. Signed-off-by: Zachary Amsden Signed-off-by: Jeremy Fitzhardinge Cc: Rusty Russell Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memory.c b/mm/memory.c index 160f5b503e..7707187484 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -467,7 +467,7 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm, */ if (is_cow_mapping(vm_flags)) { ptep_set_wrprotect(src_mm, addr, src_pte); - pte = *src_pte; + pte = pte_wrprotect(pte); } /*