Skip to contentSkip to conversation

00mm1 remove read hazard from cow.patch

PATCH New Zachary Amsden 1 participant 1 message Aug 11, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/9 00mm1 remove read hazard from cow.patch

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.

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

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

mm/memory.c +1 -1
@@ -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);
 	}
 
 	/*

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>