Bug 218640

Summary: kernel 6.9-rc1 fails to compile if debugfs is disabled
Product: Linux Reporter: anthony s. knowles (akira.2020)
Component: KernelAssignee: Virtual assignee for kernel bugs (linux-kernel)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P3    
Hardware: AMD   
OS: Linux   
Kernel Version: 6.9-rc1 Subsystem: ras
Regression: No Bisected commit-id:

Description anthony s. knowles 2024-03-25 14:54:24 UTC
kernel 6.9-rc1 fails to compile if debugfs is disabled (CONFIG_DEBUG_FS):

it fails here:

```ERROR: modpost: "ras_get_debugfs_root" [drivers/ras/amd/fmpm.ko] undefined!
make[5]: *** [scripts/Makefile.modpost:145: Module.symvers] Error 1
make[4]: *** [Makefile:1871: modpost] Error 2
make[3]: *** [debian/rules:74: build-arch] Error 2
dpkg-buildpackage: error: make -f debian/rules binary subprocess returned exit status 2
make[2]: *** [scripts/Makefile.package:121: bindeb-pkg] Error 2
make[1]: *** [/ram/linux-6.9-rc1/Makefile:1541: bindeb-pkg] Error 2
make: *** [Makefile:240: __sub-make] Error 2```

if i enable debugfs, it compiles without failing.
Comment 1 anthony s. knowles 2024-03-25 17:11:49 UTC
Borislav Petkov<bp@alien8.de> replied with the fix:

This should fix it:

---
diff --git a/drivers/ras/Kconfig b/drivers/ras/Kconfig
index fc4f4bb94a4c..41697e326fa6 100644
--- a/drivers/ras/Kconfig
+++ b/drivers/ras/Kconfig
@@ -37,7 +37,7 @@ source "drivers/ras/amd/atl/Kconfig"
 config RAS_FMPM
 	tristate "FRU Memory Poison Manager"
 	default m
-	depends on AMD_ATL && ACPI_APEI
+	depends on AMD_ATL && ACPI_APEI && DEBUG_FS
 	help
 	  Support saving and restoring memory error information across reboot
 	  using ACPI ERST as persistent storage. Error information is saved with


--
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

this works,
kind regards,
anthony s.k.