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 <zach@vmware.com> Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: linux-mm@kvack.org --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ==================================================================--- a/mm/memory.c +++ b/mm/memory.c @@ -466,7 +466,7 @@ copy_one_pte(struct mm_struct *dst_mm, s */ if (is_cow_mapping(vm_flags)) { ptep_set_wrprotect(src_mm, addr, src_pte); - pte = *src_pte; + pte = pte_wrprotect(pte); } /*
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 <zach@vmware.com> Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: linux-mm@kvack.org --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ==================================================================--- a/mm/memory.c +++ b/mm/memory.c @@ -466,7 +466,7 @@ copy_one_pte(struct mm_struct *dst_mm, s */ if (is_cow_mapping(vm_flags)) { ptep_set_wrprotect(src_mm, addr, src_pte); - pte = *src_pte; + pte = pte_wrprotect(pte); } /*
Apparently Analagous Threads
- [PATCH 3/9] 00mm3 lazy mmu mode hooks.patch
- [PATCH 0 of 13] Basic infrastructure patches for a paravirtualized kernel
- [PATCH 0 of 13] Basic infrastructure patches for a paravirtualized kernel
- [RFC] VMI for Xen?
- [PATCH 04/25] mm: remove MEMORY_DEVICE_PUBLIC support