|
@@ -1488,10 +1488,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;
|