Commit 5a4730ba authored by Mimi Zohar's avatar Mimi Zohar Committed by James Morris

evm: fix evm_inode_init_security return code

evm_inode_init_security() should return 0, when EVM is not enabled.
(Returning an error is a remnant of evm_inode_post_init_security.)
Signed-off-by: default avatarMimi Zohar <zohar@us.ibm.com>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent e1c9b23a
...@@ -85,7 +85,7 @@ static inline int evm_inode_init_security(struct inode *inode, ...@@ -85,7 +85,7 @@ static inline int evm_inode_init_security(struct inode *inode,
const struct xattr *xattr_array, const struct xattr *xattr_array,
struct xattr *evm) struct xattr *evm)
{ {
return -EOPNOTSUPP; return 0;
} }
#endif /* CONFIG_EVM_H */ #endif /* CONFIG_EVM_H */
......
...@@ -324,7 +324,7 @@ int evm_inode_init_security(struct inode *inode, ...@@ -324,7 +324,7 @@ int evm_inode_init_security(struct inode *inode,
int rc; int rc;
if (!evm_initialized || !evm_protected_xattr(lsm_xattr->name)) if (!evm_initialized || !evm_protected_xattr(lsm_xattr->name))
return -EOPNOTSUPP; return 0;
xattr_data = kzalloc(sizeof(*xattr_data), GFP_NOFS); xattr_data = kzalloc(sizeof(*xattr_data), GFP_NOFS);
if (!xattr_data) if (!xattr_data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment