From: KAMEZAWA Hiroyuki Date: Tue, 16 Oct 2007 08:25:43 +0000 (-0700) Subject: flush cache before installing new page at migraton X-Git-Tag: v2.6.24-rc1~1145 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=97ee052461446526e1de7236497e6f1b1ffedf8c;p=~emulex%2Finfiniband.git 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 --- 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))