aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2021-09-30 09:20:10 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2021-09-30 09:20:10 +1000
commit7f74e82780469c00b9ee463791383f7fcc80ceb4 (patch)
treeadc8bc29c5a3f6e2d0be107447c55ad71d6bbf8d
parentab387d89160be3cf79ccc3029c1ae8b29d257a6a (diff)
parent0d67e332e6df72f43eaa21228daa3a79e23093f3 (diff)
downloaddevel-7f74e82780469c00b9ee463791383f7fcc80ceb4.tar.gz
Merge branch 'modules-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git
-rw-r--r--kernel/module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 40ec9a030eecf4..5c26a76e800b57 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