Commit 1596fa8d authored by Zheng Yejian's avatar Zheng Yejian
Browse files

livepatch/core: Fix miss disable ro for MOD_RO_AFTER_INIT memory

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 c8783f92 ("livepatch/core: Revert module_enable_ro
and module_disable_ro"). Thanks the report from laokz in
https://gitee.com/laokz/klpmake/issues/I8HFMR

.

Fixes: c8783f92 ("livepatch/core: Revert module_enable_ro and module_disable_ro")
Signed-off-by: default avatarZheng Yejian <zhengyejian1@huawei.com>
parent b71995b9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 */