]> git.baikalelectronics.ru Git - kernel.git/commit
modules: fix compile error if don't have strict module rwx
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 25 Jun 2019 09:40:28 +0000 (17:40 +0800)
committerJessica Yu <jeyu@kernel.org>
Wed, 26 Jun 2019 17:27:59 +0000 (19:27 +0200)
commit83b23ed3d6dc37a289d1124e1a19eee0c76dd29e
treec2612618459c3b0569a3b3668687dfaec5e7d7cf
parentee3fcf80c4eb05c0984b60cc214ae2be18beeef6
modules: fix compile error if don't have strict module rwx

If CONFIG_ARCH_HAS_STRICT_MODULE_RWX is not defined,
we need stub for module_enable_nx() and module_enable_x().

If CONFIG_ARCH_HAS_STRICT_MODULE_RWX is defined, but
CONFIG_STRICT_MODULE_RWX is disabled, we need stub for
module_enable_nx.

Move frob_text() outside of the CONFIG_STRICT_MODULE_RWX,
because it is needed anyway.

Fixes: 9b742a62d1ab ("modules: fix BUG when load module with rodata=n")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
kernel/module.c