aboutsummaryrefslogtreecommitdiff
path: root/kernel/module/strict_rwx.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/module/strict_rwx.c')
-rw-r--r--kernel/module/strict_rwx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/module/strict_rwx.c b/kernel/module/strict_rwx.c
index c45caa4690e5..239e5013359d 100644
--- a/kernel/module/strict_rwx.c
+++ b/kernel/module/strict_rwx.c
@@ -34,6 +34,9 @@ int module_enable_text_rox(const struct module *mod)
for_class_mod_mem_type(type, text) {
int ret;
+ if (mod->mem[type].is_rox)
+ continue;
+
if (IS_ENABLED(CONFIG_STRICT_MODULE_RWX))
ret = module_set_memory(mod, type, set_memory_rox);
else