Skip to contentSkip to conversation

lsm: fix a missing security_uring_allowed() prototype

PATCH In review Paul Moore 1 participant 2 messages Feb 10, 2025 Security (LSM)

lore
Share & tools
lore

Paul Moore

author maintainer
#0 lore raw

PATCH 1/1 lsm: fix a missing security_uring_allowed() prototype

The !CONFIG_SECURITY dummy function was missing an inline attribute which caused the compiler to complain about a missing prototype. This patch adds the missing inline attribute.

Fixes c6ad9fdbd44b ("io_uring,lsm,selinux: add LSM hooks for io_uring_setup()")
---
 include/linux/security.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/security.h +1 -1
index 3e68f8468a22..fab843d5e621 100644
@@ -2376,7 +2376,7 @@ static inline int security_uring_cmd(struct io_uring_cmd *ioucmd)
 {
 	return 0;
 }
-extern int security_uring_allowed(void)
+extern inline int security_uring_allowed(void)
 {
 	return 0;
 }
Signature · 1 line
2.48.1
author maintainer
#1 lore raw
Quoted 19 lines · Paul Moore

The !CONFIG_SECURITY dummy function was missing an inline attribute which caused the compiler to complain about a missing prototype. This patch adds the missing inline attribute.

Fixes c6ad9fdbd44b ("io_uring,lsm,selinux: add LSM hooks for io_uring_setup()")
---
 include/linux/security.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/security.h +0 -0
index 3e68f8468a22..fab843d5e621 100644

include/linux/security.h static inline int security_uring_cmd(struct io_uring_cmd *ioucmd) · line 2379

Quoted 5 lines
include/linux/security.h +1 -1
@@ -2376,7 +2376,7 @@ static inline int security_uring_cmd(struct io_uring_cmd *ioucmd)
 {
        return 0;
 }
-extern int security_uring_allowed(void)
+extern inline int security_uring_allowed(void)

The extern also needed to be changed out, essentially doing s/extern int/static inline/. Regardless, this is now merged into lsm/dev.

Quoted 5 lines
include/linux/security.h +0 -1
 {
        return 0;
 }
--

2.48.1

Signature · 1 line
paul-moore.com