linux-next: build failure after merge of the security tree
From: Stephen Rothwell
Date: Wed Jul 08 2020 - 00:00:40 EST
Hi all,
After merging the security tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
fs/anon_inodes.c: In function 'anon_inode_make_secure_inode':
fs/anon_inodes.c:70:10: error: implicit declaration of function 'security_inode_init_security_anon'; did you mean 'security_inode_init_security'? [-Werror=implicit-function-declaration]
70 | error = security_inode_init_security_anon(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| security_inode_init_security
Caused by commit
2749d3f84a70 ("Add a new LSM-supporting anonymous inode interface")
# CONFIG_SECURITY is not set
Also, the explicit include of linux/security.h is missing ...
I have added the following patch for today.
From b2bae25c9b715e06f7e802ec7b51cfbfec046e6c Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Wed, 8 Jul 2020 13:43:01 +1000
Subject: [PATCH] fix up for "Add a new LSM-supporting anonymous inode interface"
Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
fs/anon_inodes.c | 1 +
include/linux/security.h | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
index f87f221167cf..25d92c64411e 100644
--- a/fs/anon_inodes.c
+++ b/fs/anon_inodes.c
@@ -21,6 +21,7 @@
#include <linux/magic.h>
#include <linux/anon_inodes.h>
#include <linux/pseudo_fs.h>
+#include <linux/security.h>
#include <linux/uaccess.h>
diff --git a/include/linux/security.h b/include/linux/security.h
index 95c133a8f8bb..7c6b3dcf4721 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -735,6 +735,13 @@ static inline int security_inode_init_security(struct inode *inode,
return 0;
}
+static inline int security_inode_init_security_anon(struct inode *inode,
+ const struct qstr *name,
+ const struct inode *context_inode)
+{
+ return 0;
+}
+
static inline int security_old_inode_init_security(struct inode *inode,
struct inode *dir,
const struct qstr *qstr,
--
2.27.0
--
Cheers,
Stephen Rothwell
Attachment:
pgpTgidz6Qz1r.pgp
Description: OpenPGP digital signature