diff options
Diffstat (limited to 'arch/x86/mm/init.c')
-rw-r--r-- | arch/x86/mm/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 35ee75d9061..b8054e087ea 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c | |||
@@ -336,8 +336,9 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) | |||
336 | /* | 336 | /* |
337 | * We just marked the kernel text read only above, now that | 337 | * We just marked the kernel text read only above, now that |
338 | * we are going to free part of that, we need to make that | 338 | * we are going to free part of that, we need to make that |
339 | * writeable first. | 339 | * writeable and non-executable first. |
340 | */ | 340 | */ |
341 | set_memory_nx(begin, (end - begin) >> PAGE_SHIFT); | ||
341 | set_memory_rw(begin, (end - begin) >> PAGE_SHIFT); | 342 | set_memory_rw(begin, (end - begin) >> PAGE_SHIFT); |
342 | 343 | ||
343 | printk(KERN_INFO "Freeing %s: %luk freed\n", what, (end - begin) >> 10); | 344 | printk(KERN_INFO "Freeing %s: %luk freed\n", what, (end - begin) >> 10); |