Re: [PATCH] module: fix clang CFI with MODULE_UNLOAD=n

From: Jessica Yu
Date: Tue Sep 28 2021 - 07:01:46 EST


+++ Arnd Bergmann [27/09/21 14:15 +0200]:
From: Arnd Bergmann <arnd@xxxxxxxx>

When CONFIG_MODULE_UNLOAD is disabled, the module->exit member
is not defined, causing a build failure:

kernel/module.c:4493:8: error: no member named 'exit' in 'struct module'
mod->exit = *exit;

add an #ifdef block around this.

Fixes: cf68fffb66d6 ("add support for Clang CFI")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Applied, thanks everyone!

Jessica