Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1531381 > unrolled thread

[PATCH] module: fix DEBUG_SET_MODULE_RONX typo

Started byArnd Bergmann <arnd@arndb.de>
First post2016-11-28 16:10 +0100
Last post2016-11-28 20:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] module: fix DEBUG_SET_MODULE_RONX typo Arnd Bergmann <arnd@arndb.de> - 2016-11-28 16:10 +0100
    Re: module: fix DEBUG_SET_MODULE_RONX typo Jessica Yu <jeyu@redhat.com> - 2016-11-28 20:50 +0100

#1531381 — [PATCH] module: fix DEBUG_SET_MODULE_RONX typo

FromArnd Bergmann <arnd@arndb.de>
Date2016-11-28 16:10 +0100
Subject[PATCH] module: fix DEBUG_SET_MODULE_RONX typo
Message-ID<sIvJ7-3HN-3@gated-at.bofh.it>
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>
---
 init/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/main.c b/init/main.c
index 4b529c74a0e2..74cf81e2b9d0 100644
--- a/init/main.c
+++ b/init/main.c
@@ -923,7 +923,7 @@ static int try_to_run_init_process(const char *init_filename)
 
 static noinline void __init kernel_init_freeable(void);
 
-#if defined(CONFIG_DEBUG_RODATA) || defined(CONFIG_SET_MODULE_RONX)
+#if defined(CONFIG_DEBUG_RODATA) || defined(CONFIG_DEBUG_SET_MODULE_RONX)
 bool rodata_enabled __ro_after_init = true;
 static int __init set_debug_rodata(char *str)
 {
-- 
2.9.0

[toc] | [next] | [standalone]


#1531560 — Re: module: fix DEBUG_SET_MODULE_RONX typo

FromJessica Yu <jeyu@redhat.com>
Date2016-11-28 20:50 +0100
SubjectRe: module: fix DEBUG_SET_MODULE_RONX typo
Message-ID<sIA66-6pe-5@gated-at.bofh.it>
In reply to#1531381
+++ Arnd Bergmann [28/11/16 15:59 +0100]:
>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>

Applied, thanks.

Jessica

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web