提交 0d9fbf78 编写于 作者: J Josh Poimboeuf 提交者: Jiri Kosina

module: Remove module_disable_ro()

module_disable_ro() has no more users.  Remove it.
Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: NJoe Lawrence <joe.lawrence@redhat.com>
Acked-by: NMiroslav Benes <mbenes@suse.cz>
Acked-by: NJessica Yu <jeyu@kernel.org>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 d556e1be
......@@ -860,10 +860,8 @@ extern int module_sysfs_initialized;
#ifdef CONFIG_STRICT_MODULE_RWX
extern void module_enable_ro(const struct module *mod, bool after_init);
extern void module_disable_ro(const struct module *mod);
#else
static inline void module_enable_ro(const struct module *mod, bool after_init) { }
static inline void module_disable_ro(const struct module *mod) { }
#endif
#ifdef CONFIG_GENERIC_BUG
......
......@@ -1997,19 +1997,6 @@ static void frob_writable_data(const struct module_layout *layout,
(layout->size - layout->ro_after_init_size) >> PAGE_SHIFT);
}
/* livepatching wants to disable read-only so it can frob module. */
void module_disable_ro(const struct module *mod)
{
if (!rodata_enabled)
return;
frob_text(&mod->core_layout, set_memory_rw);
frob_rodata(&mod->core_layout, set_memory_rw);
frob_ro_after_init(&mod->core_layout, set_memory_rw);
frob_text(&mod->init_layout, set_memory_rw);
frob_rodata(&mod->init_layout, set_memory_rw);
}
void module_enable_ro(const struct module *mod, bool after_init)
{
if (!rodata_enabled)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册