[PATCH 1/1] UBUNTU: SAUCE: (lockdown) security: lockdown: remove trailing semicolon before function body

Andrea Righi andrea.righi at canonical.com
Tue May 26 08:05:35 UTC 2020


From: "Jason A. Donenfeld" <Jason at zx2c4.com>

BugLink: https://bugs.launchpad.net/bugs/1880660

A prior commit added security_lock_kernel_down for both CONFIG_SECURITY
and !CONFIG_SECURITY, but in an apparent copy and paste error, the
!CONFIG_SECURITY definition was added with a trailing semicolon before
the function body, causing compilation errors unearthed by
build.wireguard.com:

./include/linux/security.h:1277:1: error: expected identifier or ‘(’ before ‘{’ token
 1277 | {
      | ^
./include/linux/security.h:1276:19: warning: ‘security_lock_kernel_down’ declared ‘static’ but never defined [-Wunused-function]
 1276 | static inline int security_lock_kernel_down(const char *where, enum lockdown_reason level);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~

The solution is to simply remove the errant semicolon.

Fixes: 40fc208c8aae ("UBUNTU: SAUCE: (lockdown) security: lockdown: expose a hook to lock the kernel down")
Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>
(adjusted like 3af5459da853e8c49416d644ea219f334d25563c
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Andrea Righi <andrea.righi at canonical.com>
---
 include/linux/security.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/security.h b/include/linux/security.h
index 5c59012fff3b..4be62fb3f454 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -1273,7 +1273,7 @@ static inline int security_locked_down(enum lockdown_reason what)
 {
 	return 0;
 }
-static inline int security_lock_kernel_down(const char *where, enum lockdown_reason level);
+static inline int security_lock_kernel_down(const char *where, enum lockdown_reason level)
 {
 	return 0;
 }
-- 
2.25.1




More information about the kernel-team mailing list