]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/xen/mmu.c
xen: make sure stray alias mappings are gone before pinning
[linux-2.6-omap-h63xx.git] / arch / x86 / xen / mmu.c
index aba77b2b7d1853a188f42696e92255091de041b2..89f3b6edc65a0996fbc111d5c7c82084d1fa4bfc 100644 (file)
@@ -850,13 +850,16 @@ static int xen_pin_page(struct mm_struct *mm, struct page *page,
    read-only, and can be pinned. */
 static void __xen_pgd_pin(struct mm_struct *mm, pgd_t *pgd)
 {
+       vm_unmap_aliases();
+
        xen_mc_batch();
 
-       if (xen_pgd_walk(mm, xen_pin_page, USER_LIMIT)) {
-               /* re-enable interrupts for kmap_flush_unused */
+        if (xen_pgd_walk(mm, xen_pin_page, USER_LIMIT)) {
+               /* re-enable interrupts for flushing */
                xen_mc_issue(0);
+
                kmap_flush_unused();
-               vm_unmap_aliases();
+
                xen_mc_batch();
        }