hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8HNHM
--------------------------------
It was missed to set MOD_RO_AFTER_INIT type memory to be writable when porting e1e064674b6b ("livepatch/core: Revert module_enable_ro and module_disable_ro"). Thanks the report from laokz in https://gitee.com/laokz/klpmake/issues/I8HFMR.
Fixes: e1e064674b6b ("livepatch/core: Revert module_enable_ro and module_disable_ro") Signed-off-by: Zheng Yejian zhengyejian1@huawei.com --- kernel/module/strict_rwx.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/kernel/module/strict_rwx.c b/kernel/module/strict_rwx.c index 397e18f50517..575bf99c723a 100644 --- a/kernel/module/strict_rwx.c +++ b/kernel/module/strict_rwx.c @@ -46,6 +46,7 @@ void module_disable_ro(const struct module *mod) module_set_memory(mod, MOD_INIT_TEXT, set_memory_rw); module_set_memory(mod, MOD_RODATA, set_memory_rw); module_set_memory(mod, MOD_INIT_RODATA, set_memory_rw); + module_set_memory(mod, MOD_RO_AFTER_INIT, set_memory_rw); } #endif /* CONFIG_LIVEPATCH_WO_FTRACE */