From: Zachary Amsden Date: Sun, 1 Oct 2006 06:29:30 +0000 (-0700) Subject: [PATCH] paravirt: remove read hazard from cow X-Git-Tag: MMI-PSA29.97-13-9~46868 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3dc907951446b9317b1887223caa4e083390de9f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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 160f5b503ead..7707187484cc 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); } /*