Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- kernel/module.c | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
+ kernel/module.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
--- a/kernel/module.c
+++ b/kernel/module.c
static void frob_rodata(const struct module_layout *layout,
int (*set_memory)(unsigned long start, int num_pages))
{
-@@ -2039,17 +2040,21 @@ static void disable_ro_nx(const struct m
+@@ -2039,17 +2040,23 @@ static void disable_ro_nx(const struct m
frob_writable_data(layout, set_memory_x);
}
frob_text(&mod->init_layout, set_memory_x);
}
+#else /* !CONFIG_ARCH_HAS_STRICT_MODULE_RWX */
++static void disable_ro_nx(const struct module_layout *layout) { }
+static void module_enable_nx(const struct module *mod) { }
++static void module_disable_nx(const struct module *mod) { }
+static void module_enable_x(const struct module *mod) { }
+#endif /* CONFIG_ARCH_HAS_STRICT_MODULE_RWX */