[PATCH] lsm: export security_mmap_backing_file
From: Arnd Bergmann
Date: Wed Mar 18 2026 - 06:43:46 EST
From: Arnd Bergmann <arnd@xxxxxxxx>
This symbol can now be used from a loadable erofs module, which causes
a build failure when it is not exported:
ERROR: modpost: "security_mmap_backing_file" [fs/erofs/erofs.ko] undefined!
Fixes: 0e2baaf8fed0 ("lsm: add the security_mmap_backing_file() hook")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
security/security.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/security/security.c b/security/security.c
index 8d10b184ce25..3e426a762864 100644
--- a/security/security.c
+++ b/security/security.c
@@ -2529,6 +2529,7 @@ int security_mmap_backing_file(struct vm_area_struct *vma,
return call_int_hook(mmap_backing_file, vma, backing_file, user_file);
}
+EXPORT_SYMBOL_GPL(security_mmap_backing_file);
/**
* security_mmap_addr() - Check if mmap'ing an address is allowed
--
2.39.5