Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
[pandora-kernel.git] / arch / x86 / xen / mmu.c
index 6e27979..c82df6c 100644 (file)
@@ -79,8 +79,7 @@
 
 /*
  * Protects atomic reservation decrease/increase against concurrent increases.
- * Also protects non-atomic updates of current_pages and driver_pages, and
- * balloon lists.
+ * Also protects non-atomic updates of current_pages and balloon lists.
  */
 DEFINE_SPINLOCK(xen_reservation_lock);
 
@@ -1488,10 +1487,12 @@ static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte)
        /*
         * If the new pfn is within the range of the newly allocated
         * kernel pagetable, and it isn't being mapped into an
-        * early_ioremap fixmap slot, make sure it is RO.
+        * early_ioremap fixmap slot as a freshly allocated page, make sure
+        * it is RO.
         */
-       if (!is_early_ioremap_ptep(ptep) &&
-           pfn >= pgt_buf_start && pfn < pgt_buf_end)
+       if (((!is_early_ioremap_ptep(ptep) &&
+                       pfn >= pgt_buf_start && pfn < pgt_buf_end)) ||
+                       (is_early_ioremap_ptep(ptep) && pfn != (pgt_buf_end - 1)))
                pte = pte_wrprotect(pte);
 
        return pte;