diff --git a/kernel/module.c b/kernel/module.c index 40ec9a030eecf41d5597e6c910746aab385b1da0..5c26a76e800b579a1e450b1aab962da2df7fc0d6 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