mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/9] 00mm1 remove read hazard from cow.patch
@ 2006-08-11  9:15 Zachary Amsden
  0 siblings, 0 replies; 2+ messages in thread
From: Zachary Amsden @ 2006-08-11  9:15 UTC (permalink / raw)
  To: Andrew Morton, Andi Kleen, Zachary Amsden, Chris Wright,
	Rusty Russell, Jeremy Fitzhardinge, Virtualization Mailing List,
	Linux Kernel Mailing List, Linux MM, :,
	Zachary Amsden

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);
 	}
 
 	/*

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/9] 00mm1 remove read hazard from cow.patch
@ 2006-08-11  9:17 Zachary Amsden
  0 siblings, 0 replies; 2+ messages in thread
From: Zachary Amsden @ 2006-08-11  9:17 UTC (permalink / raw)
  To: Andrew Morton, Andi Kleen, Zachary Amsden, Chris Wright,
	Rusty Russell, Jeremy Fitzhardinge, Virtualization Mailing List,
	Linux Kernel Mailing List, Linux MM, Zachary Amsden

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);
 	}
 
 	/*

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-11  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-11  9:15 [PATCH 1/9] 00mm1 remove read hazard from cow.patch Zachary Amsden
2006-08-11  9:17 Zachary Amsden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®