summaryrefslogtreecommitdiffstats
path: root/security/integrity/ima/ima_main.c
diff options
context:
space:
mode:
authorDmitry Kasatkin <dmitry.kasatkin@gmail.com>2014-10-01 21:43:10 +0300
committerMimi Zohar <zohar@linux.vnet.ibm.com>2014-10-07 14:32:54 -0400
commit456f5fd3f6017f10d04d459159ac7bd9e3815c5e (patch)
tree304de71a234e3c302f7b372f72affd5661f30221 /security/integrity/ima/ima_main.c
parentc2baec7ffaf6a2c15e03028ed9ef82a92cc49a94 (diff)
downloadop-kernel-dev-456f5fd3f6017f10d04d459159ac7bd9e3815c5e.zip
op-kernel-dev-456f5fd3f6017f10d04d459159ac7bd9e3815c5e.tar.gz
ima: use path names cache
__getname() uses slab allocation which is faster than kmalloc. Make use of it. Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security/integrity/ima/ima_main.c')
-rw-r--r--security/integrity/ima/ima_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index 72faf0b..eeee00dc 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -246,7 +246,8 @@ out_digsig:
rc = -EACCES;
kfree(xattr_value);
out_free:
- kfree(pathbuf);
+ if (pathbuf)
+ __putname(pathbuf);
out:
mutex_unlock(&inode->i_mutex);
if ((rc && must_appraise) && (ima_appraise & IMA_APPRAISE_ENFORCE))
OpenPOWER on IntegriCloud