]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
lsm: fix a missing security_uring_allowed() prototype
authorPaul Moore <paul@paul-moore.com>
Mon, 10 Feb 2025 03:32:15 +0000 (22:32 -0500)
committerPaul Moore <paul@paul-moore.com>
Mon, 10 Feb 2025 14:50:17 +0000 (09:50 -0500)
The !CONFIG_SECURITY dummy function was declared as an "extern int"
instead of "static inline" (likely a copy-n-paste error), which was
was causing the compiler to complain about a missing prototype.  This
patch converts the dummy definition over to a "static inline" to resolve
the compiler problems.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/oe-kbuild-all/202502081912.TeokpAAe-lkp@intel.com/
Fixes: c6ad9fdbd44b ("io_uring,lsm,selinux: add LSM hooks for io_uring_setup()")
Signed-off-by: Paul Moore <paul@paul-moore.com>
include/linux/security.h

index 3e68f8468a22bcaceeabb3a8c035ebaf78a875e8..27f64a9747f8fdf9420927cf26c6468edb0fc94e 100644 (file)
@@ -2376,7 +2376,7 @@ static inline int security_uring_cmd(struct io_uring_cmd *ioucmd)
 {
        return 0;
 }
-extern int security_uring_allowed(void)
+static inline int security_uring_allowed(void)
 {
        return 0;
 }