From 97ee052461446526e1de7236497e6f1b1ffedf8c Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Tue, 16 Oct 2007 01:25:43 -0700 Subject: [PATCH] flush cache before installing new page at migraton In migration, a new page should be cache flushed before set_pte() in some archs which have virtually-tagged cache. Signed-off-by: KAMEZAWA Hiroyuki Cc: "Luck, Tony" Cc: Christoph Lameter Cc: Hugh Dickins Cc: Nick Piggin Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/migrate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/migrate.c b/mm/migrate.c index 71c38b43c01..ea11ddb5827 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -171,6 +171,7 @@ static void remove_migration_pte(struct vm_area_struct *vma, pte = pte_mkold(mk_pte(new, vma->vm_page_prot)); if (is_write_migration_entry(entry)) pte = pte_mkwrite(pte); + flush_cache_page(vma, addr, pte_pfn(pte)); set_pte_at(mm, addr, ptep, pte); if (PageAnon(new)) -- 2.41.1