summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-08-27 05:17:07 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-08-27 05:17:07 +0200
commit5311034ddda7aad48934520d3536b9d0e4502672 (patch)
tree1c4f522322883ccf8e253c95343abc74344bfab8
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gee... (diff)
parentIMA: iint put in ima_counts_get and put (diff)
downloadlinux-5311034ddda7aad48934520d3536b9d0e4502672.tar.xz
linux-5311034ddda7aad48934520d3536b9d0e4502672.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: IMA: iint put in ima_counts_get and put
-rw-r--r--security/integrity/ima/ima_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index 101c512564ec..4732f5e5d127 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -262,6 +262,8 @@ void ima_counts_put(struct path *path, int mask)
else if (mask & (MAY_READ | MAY_EXEC))
iint->readcount--;
mutex_unlock(&iint->mutex);
+
+ kref_put(&iint->refcount, iint_free);
}
/*
@@ -291,6 +293,8 @@ void ima_counts_get(struct file *file)
if (file->f_mode & FMODE_WRITE)
iint->writecount++;
mutex_unlock(&iint->mutex);
+
+ kref_put(&iint->refcount, iint_free);
}
EXPORT_SYMBOL_GPL(ima_counts_get);