summaryrefslogtreecommitdiffstats
path: root/security/integrity/ima/ima_api.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2014-09-12 22:40:22 +1000
committerJames Morris <james.l.morris@oracle.com>2014-09-12 22:40:22 +1000
commitac60ab4b4968b54fb5af20eac9dd78e36ad910c1 (patch)
treea47e414fb34d91eb012b121d8138c6cee1fe065b /security/integrity/ima/ima_api.c
parenta0cfd75fdc46b56978ece383a7d6f6b04e9087ad (diff)
parenta2d61ed525f3458a913147fd02b1a5cf15e7551b (diff)
downloadtalos-obmc-linux-ac60ab4b4968b54fb5af20eac9dd78e36ad910c1.tar.gz
talos-obmc-linux-ac60ab4b4968b54fb5af20eac9dd78e36ad910c1.zip
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into next
Diffstat (limited to 'security/integrity/ima/ima_api.c')
-rw-r--r--security/integrity/ima/ima_api.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c
index d9cd5ce14d2b..65c41a968cc1 100644
--- a/security/integrity/ima/ima_api.c
+++ b/security/integrity/ima/ima_api.c
@@ -330,10 +330,9 @@ const char *ima_d_path(struct path *path, char **pathbuf)
{
char *pathname = NULL;
- /* We will allow 11 spaces for ' (deleted)' to be appended */
- *pathbuf = kmalloc(PATH_MAX + 11, GFP_KERNEL);
+ *pathbuf = kmalloc(PATH_MAX, GFP_KERNEL);
if (*pathbuf) {
- pathname = d_path(path, *pathbuf, PATH_MAX + 11);
+ pathname = d_absolute_path(path, *pathbuf, PATH_MAX);
if (IS_ERR(pathname)) {
kfree(*pathbuf);
*pathbuf = NULL;
OpenPOWER on IntegriCloud