Skip to content

Commit 0d9fbf7

Browse files
jpoimboeJiri Kosina
authored andcommitted
module: Remove module_disable_ro()
module_disable_ro() has no more users. Remove it. Signed-off-by: Josh Poimboeuf <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Joe Lawrence <[email protected]> Acked-by: Miroslav Benes <[email protected]> Acked-by: Jessica Yu <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent d556e1b commit 0d9fbf7

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

include/linux/module.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,10 +860,8 @@ extern int module_sysfs_initialized;
860860

861861
#ifdef CONFIG_STRICT_MODULE_RWX
862862
extern void module_enable_ro(const struct module *mod, bool after_init);
863-
extern void module_disable_ro(const struct module *mod);
864863
#else
865864
static inline void module_enable_ro(const struct module *mod, bool after_init) { }
866-
static inline void module_disable_ro(const struct module *mod) { }
867865
#endif
868866

869867
#ifdef CONFIG_GENERIC_BUG

kernel/module.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,19 +1997,6 @@ static void frob_writable_data(const struct module_layout *layout,
19971997
(layout->size - layout->ro_after_init_size) >> PAGE_SHIFT);
19981998
}
19991999

2000-
/* livepatching wants to disable read-only so it can frob module. */
2001-
void module_disable_ro(const struct module *mod)
2002-
{
2003-
if (!rodata_enabled)
2004-
return;
2005-
2006-
frob_text(&mod->core_layout, set_memory_rw);
2007-
frob_rodata(&mod->core_layout, set_memory_rw);
2008-
frob_ro_after_init(&mod->core_layout, set_memory_rw);
2009-
frob_text(&mod->init_layout, set_memory_rw);
2010-
frob_rodata(&mod->init_layout, set_memory_rw);
2011-
}
2012-
20132000
void module_enable_ro(const struct module *mod, bool after_init)
20142001
{
20152002
if (!rodata_enabled)

0 commit comments

Comments
 (0)