Skip to content

Commit 315df9c

Browse files
chleroymcgrof
authored andcommitted
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 <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 398ec3e commit 315df9c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

kernel/module/strict_rwx.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,8 @@ void module_enable_text_rox(const struct module *mod)
3838

3939
void module_enable_rodata_ro(const struct module *mod, bool after_init)
4040
{
41-
if (!IS_ENABLED(CONFIG_STRICT_MODULE_RWX))
42-
return;
43-
#ifdef CONFIG_STRICT_MODULE_RWX
44-
if (!rodata_enabled)
41+
if (!IS_ENABLED(CONFIG_STRICT_MODULE_RWX) || !rodata_enabled)
4542
return;
46-
#endif
4743

4844
module_set_memory(mod, MOD_RODATA, set_memory_ro);
4945
module_set_memory(mod, MOD_INIT_RODATA, set_memory_ro);

0 commit comments

Comments
 (0)