aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds2021-10-13 07:42:07 -0700
committerLinus Torvalds2021-10-13 07:42:07 -0700
commit348949d9a4440abdab3b1dc99a9bb660e8c7da7c (patch)
tree2e824dcc6ada1a232784b03a4f1049812f68e38f /kernel
parentf4d0cc426f77df6890aa868f96c2de89686aae8a (diff)
parent0d67e332e6df72f43eaa21228daa3a79e23093f3 (diff)
Merge tag 'modules-for-v5.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux
Pull modules fix from Jessica Yu: - Build fix for cfi_init() when CONFIG_MODULE_UNLOAD=n * tag 'modules-for-v5.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: module: fix clang CFI with MODULE_UNLOAD=n
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 40ec9a030eec..5c26a76e800b 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -4489,8 +4489,10 @@ static void cfi_init(struct module *mod)
/* Fix init/exit functions to point to the CFI jump table */
if (init)
mod->init = *init;
+#ifdef CONFIG_MODULE_UNLOAD
if (exit)
mod->exit = *exit;
+#endif
cfi_module_add(mod, module_addr_min);
#endif