mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
mm: fix RODATA_TEST failure "rodata_test: test data was not read only"
On powerpc, RODATA_TEST fails with message the following messages: Freeing unused kernel memory: 528K rodata_test: test data was not read only This is because GCC allocates it to .data section: c0695034 g O .data 00000004 rodata_test_data Since commit056b9d8a76("mm: remove rodata_test_data export, add pr_fmt"), rodata_test_data is used only inside rodata_test.c By declaring it static, it gets properly allocated into .rodata section instead of .data: c04df710 l O .rodata 00000004 rodata_test_data Fixes:056b9d8a76("mm: remove rodata_test_data export, add pr_fmt") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Christophe Leroy <[email protected]> Cc: Kees Cook <[email protected]> Cc: Jinbum Park <[email protected]> Cc: Segher Boessenkool <[email protected]> Cc: David Laight <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
31d1e130f4
commit
a872eb2131
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@
|
|||
#include <linux/uaccess.h>
|
||||
#include <asm/sections.h>
|
||||
|
||||
const int rodata_test_data = 0xC3;
|
||||
static const int rodata_test_data = 0xC3;
|
||||
|
||||
void rodata_test(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue