diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2023-12-21 10:02:47 +0100 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2024-02-02 10:21:25 -0800 |
commit | 315df9c476c587af26467f10c6f27414572f3938 (patch) | |
tree | d904150134601a8099cd4a37847e26814c2a0304 /kernel/module | |
parent | 398ec3e925eb1c4d5850ec60f7075e0c20199003 (diff) |
modules: Remove #ifdef CONFIG_STRICT_MODULE_RWX around rodata_enabled
Now that rodata_enabled is declared at all time, the #ifdef
CONFIG_STRICT_MODULE_RWX can be removed.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module')
-rw-r--r-- | kernel/module/strict_rwx.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/module/strict_rwx.c b/kernel/module/strict_rwx.c index 9b2d58a8d59d..b36d93983465 100644 --- a/kernel/module/strict_rwx.c +++ b/kernel/module/strict_rwx.c @@ -38,12 +38,8 @@ void module_enable_text_rox(const struct module *mod) void module_enable_rodata_ro(const struct module *mod, bool after_init) { - if (!IS_ENABLED(CONFIG_STRICT_MODULE_RWX)) - return; -#ifdef CONFIG_STRICT_MODULE_RWX - if (!rodata_enabled) + if (!IS_ENABLED(CONFIG_STRICT_MODULE_RWX) || !rodata_enabled) return; -#endif module_set_memory(mod, MOD_RODATA, set_memory_ro); module_set_memory(mod, MOD_INIT_RODATA, set_memory_ro); |