Commit 3dc907951446b9317b1887223caa4e083390de9f

Authored by Zachary Amsden
Committed by Linus Torvalds
1 parent bd4c8ce41a

[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 <zach@vmware.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -467,7 +467,7 @@
467 467 */
468 468 if (is_cow_mapping(vm_flags)) {
469 469 ptep_set_wrprotect(src_mm, addr, src_pte);
470   - pte = *src_pte;
  470 + pte = pte_wrprotect(pte);
471 471 }
472 472  
473 473 /*