]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/mm/init_32.c
x86: make sure initmem is writable
[linux-2.6-omap-h63xx.git] / arch / x86 / mm / init_32.c
index 0d3369b900e967ba999a2add81e95fbc6e827c4a..4d115654519442babfa3e0d2a3f4d4fc3749a9b6 100644 (file)
@@ -780,6 +780,13 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
 {
        unsigned long addr;
 
+       /*
+        * We just marked the kernel text read only above, now that
+        * we are going to free part of that, we need to make that
+        * writeable first.
+        */
+       set_memory_rw(begin, (end - begin) >> PAGE_SHIFT);
+
        for (addr = begin; addr < end; addr += PAGE_SIZE) {
                ClearPageReserved(virt_to_page(addr));
                init_page_count(virt_to_page(addr));