summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-12-04 15:47:44 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-12-16 12:16:46 -0500
commitec29ea544b1ce204ba3575ba05fccf3069d00c3f (patch)
tree9b8073563183059e275730a8bb4f5b0c01800b6e
parente81e3f4dca6c54116a24aec217d2c15c6f58ada5 (diff)
downloadop-kernel-dev-ec29ea544b1ce204ba3575ba05fccf3069d00c3f.zip
op-kernel-dev-ec29ea544b1ce204ba3575ba05fccf3069d00c3f.tar.gz
ima: valid return code from ima_inode_alloc
ima_inode_alloc returns 0 and 1, but the LSM hooks expects an errno. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--security/integrity/ima/ima_iint.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/security/integrity/ima/ima_iint.c b/security/integrity/ima/ima_iint.c
index a4e2b1d..4a53f39 100644
--- a/security/integrity/ima/ima_iint.c
+++ b/security/integrity/ima/ima_iint.c
@@ -87,8 +87,6 @@ out:
/**
* ima_inode_alloc - allocate an iint associated with an inode
* @inode: pointer to the inode
- *
- * Return 0 on success, 1 on failure.
*/
int ima_inode_alloc(struct inode *inode)
{
@@ -99,7 +97,7 @@ int ima_inode_alloc(struct inode *inode)
iint = ima_iint_insert(inode);
if (!iint)
- return 1;
+ return -ENOMEM;
return 0;
}
OpenPOWER on IntegriCloud