[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] make_page_readonly() must flush unused kmaps when handling



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 0970a2fdbee95d74d47d6489a8262814a0d2b3c5
# Parent  8b384e7413827c381924cc741c818a5f33ed2ca2
make_page_readonly() must flush unused kmaps when handling
a high-memory page. Otherwise stale writable mappings may 
persist. This fixes a corner case for alloc_ldt (which can
vmalloc an LDT and hence use highmem pages).

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 8b384e741382 -r 0970a2fdbee9 
linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c   Fri Nov 18 16:42:45 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c   Fri Nov 18 16:50:25 2005
@@ -409,7 +409,9 @@
        if ((unsigned long)va >= (unsigned long)high_memory) {
                unsigned long pfn = pte_pfn(*pte);
 #ifdef CONFIG_HIGHMEM
-               if (pfn < highstart_pfn)
+               if (pfn >= highstart_pfn)
+                       kmap_flush_unused(); /* flush stale writable kmaps */
+               else
 #endif
                        make_lowmem_page_readonly(
                                phys_to_virt(pfn << PAGE_SHIFT)); 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.