diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-01-30 12:34:07 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 12:34:07 (GMT) |
commit | 3c1df68b848b39270752ff8d4b956cc4a4dce0f6 (patch) | |
tree | 7edffa58f936a55fe6a69ca32cde71c0b9d20354 /arch/x86/mm/init_64.c | |
parent | 488fd99588bf23da951b524a806e44feaa1aa366 (diff) | |
download | linux-3c1df68b848b39270752ff8d4b956cc4a4dce0f6.tar.xz |
x86: make sure initmem is writable
When we free initmem, various rodata and CPA checks may have left
memory read only.. this patch ensures that the memory is writable
before we free it.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 9b69fa5..f97ace7 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -570,6 +570,7 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) * 2Mb kernel mapping just for this debug feature. */ if (begin >= __START_KERNEL_map) { + set_memory_rw(begin, (end - begin)/PAGE_SIZE); set_memory_np(begin, (end - begin)/PAGE_SIZE); set_memory_nx(begin, (end - begin)/PAGE_SIZE); } |