[PATCH] UBUNTU: SAUCE: x86/kernel/setup.c: re-add include of module.h

Rasmus Villemoes linux at rasmusvillemoes.dk
Thu Jun 1 07:45:01 UTC 2017


This reverts the part of
1a4573084ebb1298a90694259f853c1327a62079 (x86/kernel: Audit and remove
any unnecessary uses of module.h) that touches x86/kernel/setup.c. While
nothing in mainline's version of the file uses anything from module.h,
Ubuntu's kernel has a call to enforce_signed_modules().

This goes unnoticed with the defalt Ubuntu config, because the file
includes linux/kexec.h, which in turn includes linux/module.h. However,
that #include is guarded by CONFIG_KEXEC_CORE, so if one disables
CONFIG_KEXEC and CONFIG_KEXEC_FILE, the result is

arch/x86/kernel/setup.c:1149:3: error: implicit declaration of function
‘enforce_signed_modules’ [-Werror=implicit-function-declaration]

Signed-off-by: Rasmus Villemoes <linux at rasmusvillemoes.dk>
---
 arch/x86/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index d179725..b815923 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -36,7 +36,7 @@
 #include <linux/console.h>
 #include <linux/root_dev.h>
 #include <linux/highmem.h>
-#include <linux/export.h>
+#include <linux/module.h>
 #include <linux/efi.h>
 #include <linux/init.h>
 #include <linux/edd.h>
-- 
2.1.4





More information about the kernel-team mailing list