Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751062AbWHKJ3v (ORCPT ); Fri, 11 Aug 2006 05:29:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751075AbWHKJ3v (ORCPT ); Fri, 11 Aug 2006 05:29:51 -0400 Received: from mailout1.vmware.com ([65.113.40.130]:43919 "EHLO mailout1.vmware.com") by vger.kernel.org with ESMTP id S1751060AbWHKJ3u (ORCPT ); Fri, 11 Aug 2006 05:29:50 -0400 Date: Fri, 11 Aug 2006 02:15:19 -0700 Message-Id: <200608110915.k7B9FJxV023257@zach-dev.vmware.com> Subject: [PATCH 1/9] 00mm1 remove read hazard from cow.patch From: Zachary Amsden To: Andrew Morton , Andi Kleen , Zachary Amsden , Chris Wright , Rusty Russell , Jeremy Fitzhardinge , Virtualization Mailing List , Linux Kernel Mailing List , Linux MM , ":"@vmware.com, Zachary Amsden X-OriginalArrivalTime: 11 Aug 2006 09:29:49.0486 (UTC) FILETIME=[B1234CE0:01C6BD28] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 946 Lines: 30 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 Signed-off-by: Jeremy Fitzhardinge 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); } /* - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/