From c0d2474f1bff31f973bf54640b0a16cddf6dd36e Mon Sep 17 00:00:00 2001 From: swalter Date: Wed, 18 Mar 2009 17:31:59 +0000 Subject: [PATCH] Remove cache aliases before COW-ing a page There is a window between flushing the caches in dup_mmap and marking the PTE read-only in copy_one_pte where new dirty cachelines could be pulled into the cache. If these cachelines are not flushed before we copy the page, there is a potential for that dirty data to get lost. PTR#327376 external=n git-svn-id: https://svn:8043/mls1/linux_kernel/ylnx/next/wip@118766 20df27af-2ed3-0310-a734-c3bd92db44f8 --- src/mm/memory.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mm/memory.c b/src/mm/memory.c index 0b7a668..d0bc8c1 100644 --- a/src/mm/memory.c +++ b/src/mm/memory.c @@ -1597,6 +1597,7 @@ gotten: new_page = alloc_page_vma(GFP_HIGHUSER, vma, address); if (!new_page) goto oom; + flush_cache_page(vma, address, pte_pfn(orig_pte)); cow_user_page(new_page, old_page, address); } -- 1.6.2.3.g5bbe6