Revert "Revert "module: Make module_enable_ro() static again""
This reverts commit 95a06095ff
as it
should now be resolved.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I521215f77e69ac4d26d4977d2a16a40298d96509
This commit is contained in:
@@ -873,12 +873,6 @@ extern int module_sysfs_initialized;
|
|||||||
|
|
||||||
#define __MODULE_STRING(x) __stringify(x)
|
#define __MODULE_STRING(x) __stringify(x)
|
||||||
|
|
||||||
#ifdef CONFIG_STRICT_MODULE_RWX
|
|
||||||
extern void module_enable_ro(const struct module *mod, bool after_init);
|
|
||||||
#else
|
|
||||||
static inline void module_enable_ro(const struct module *mod, bool after_init) { }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_GENERIC_BUG
|
#ifdef CONFIG_GENERIC_BUG
|
||||||
void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *,
|
void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *,
|
||||||
struct module *);
|
struct module *);
|
||||||
|
@@ -2000,7 +2000,7 @@ static void frob_writable_data(const struct module_layout *layout,
|
|||||||
(layout->size - layout->ro_after_init_size) >> PAGE_SHIFT);
|
(layout->size - layout->ro_after_init_size) >> PAGE_SHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void module_enable_ro(const struct module *mod, bool after_init)
|
static void module_enable_ro(const struct module *mod, bool after_init)
|
||||||
{
|
{
|
||||||
if (!rodata_enabled)
|
if (!rodata_enabled)
|
||||||
return;
|
return;
|
||||||
@@ -2028,6 +2028,7 @@ static void module_enable_nx(const struct module *mod)
|
|||||||
|
|
||||||
#else /* !CONFIG_STRICT_MODULE_RWX */
|
#else /* !CONFIG_STRICT_MODULE_RWX */
|
||||||
static void module_enable_nx(const struct module *mod) { }
|
static void module_enable_nx(const struct module *mod) { }
|
||||||
|
static void module_enable_ro(const struct module *mod, bool after_init) {}
|
||||||
#endif /* CONFIG_STRICT_MODULE_RWX */
|
#endif /* CONFIG_STRICT_MODULE_RWX */
|
||||||
static void module_enable_x(const struct module *mod)
|
static void module_enable_x(const struct module *mod)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user