diff options
Diffstat (limited to 'arch/x86/mm/init_32.c')
-rw-r--r-- | arch/x86/mm/init_32.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 0d3369b900e9..4d1156545194 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -780,6 +780,13 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) | |||
780 | { | 780 | { |
781 | unsigned long addr; | 781 | unsigned long addr; |
782 | 782 | ||
783 | /* | ||
784 | * We just marked the kernel text read only above, now that | ||
785 | * we are going to free part of that, we need to make that | ||
786 | * writeable first. | ||
787 | */ | ||
788 | set_memory_rw(begin, (end - begin) >> PAGE_SHIFT); | ||
789 | |||
783 | for (addr = begin; addr < end; addr += PAGE_SIZE) { | 790 | for (addr = begin; addr < end; addr += PAGE_SIZE) { |
784 | ClearPageReserved(virt_to_page(addr)); | 791 | ClearPageReserved(virt_to_page(addr)); |
785 | init_page_count(virt_to_page(addr)); | 792 | init_page_count(virt_to_page(addr)); |