Skip to content

Commit

Permalink
x86: move misplaced rodata check call
Browse files Browse the repository at this point in the history
It looks like a mismerge put the rodata self-check in the wrong spot; move
it to the right place after marking the .rodata section read only.

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>
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Jan 30, 2008
1 parent 4c61afc commit 1a48725
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,6 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
set_memory_rw(begin, (end - begin)/PAGE_SIZE);
set_memory_np(begin, (end - begin)/PAGE_SIZE);
set_memory_nx(begin, (end - begin)/PAGE_SIZE);
rodata_test();
}
#endif
}
Expand Down Expand Up @@ -614,6 +613,8 @@ void mark_rodata_ro(void)
printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n",
(end - start) >> 10);

rodata_test();

#ifdef CONFIG_CPA_DEBUG
printk("Testing CPA: undo %lx-%lx\n", start, end);
set_memory_rw(start, (end-start) >> PAGE_SHIFT);
Expand Down

0 comments on commit 1a48725

Please sign in to comment.