[PATCH 9 of 13] Remove the read hazard from the COW path in copy_one_pte

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

 



1 file changed, 1 insertion(+), 1 deletion(-)
mm/memory.c |    2 +-


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 at vmware.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy at xensource.com>



===================================================================

diff -r 0adfc39039c7 -r 20f9c0c451af mm/memory.c
--- a/mm/memory.c	Tue Aug 01 01:32:00 2006 -0700
+++ b/mm/memory.c	Tue Aug 01 01:32:00 2006 -0700
@@ -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);
 	}
 
 	/*




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux