diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-11-28 09:59:13 -0500 |
---|---|---|
committer | Jessica Yu <jeyu@redhat.com> | 2016-11-28 14:37:57 -0500 |
commit | 4d217a5adccf5e806790c37c61cc374a08bd7381 (patch) | |
tree | 6e25866ea91837cdb968d8aa3b7040feb363da2e | |
parent | 39290b389ea2654f9190e3b48c57d27b24def83e (diff) |
module: fix DEBUG_SET_MODULE_RONX typo
The newly added 'rodata_enabled' global variable is protected by
the wrong #ifdef, leading to a link error when CONFIG_DEBUG_SET_MODULE_RONX
is turned on:
kernel/module.o: In function `disable_ro_nx':
module.c:(.text.unlikely.disable_ro_nx+0x88): undefined reference to `rodata_enabled'
kernel/module.o: In function `module_disable_ro':
module.c:(.text.module_disable_ro+0x8c): undefined reference to `rodata_enabled'
kernel/module.o: In function `module_enable_ro':
module.c:(.text.module_enable_ro+0xb0): undefined reference to `rodata_enabled'
CONFIG_SET_MODULE_RONX does not exist, so use the correct one instead.
Fixes: 39290b389ea2 ("module: extend 'rodata=off' boot cmdline parameter to module mappings")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jessica Yu <jeyu@redhat.com>
-rw-r--r-- | init/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/init/main.c b/init/main.c index 959a24242988..035bd5e997df 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -915,7 +915,7 @@ static int try_to_run_init_process(const char *init_filename) | |||
915 | 915 | ||
916 | static noinline void __init kernel_init_freeable(void); | 916 | static noinline void __init kernel_init_freeable(void); |
917 | 917 | ||
918 | #if defined(CONFIG_DEBUG_RODATA) || defined(CONFIG_SET_MODULE_RONX) | 918 | #if defined(CONFIG_DEBUG_RODATA) || defined(CONFIG_DEBUG_SET_MODULE_RONX) |
919 | bool rodata_enabled __ro_after_init = true; | 919 | bool rodata_enabled __ro_after_init = true; |
920 | static int __init set_debug_rodata(char *str) | 920 | static int __init set_debug_rodata(char *str) |
921 | { | 921 | { |