lkml.org 
[lkml]   [2009]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH]:Return proper error value on failure of dentry_open
From
Date
    dentry_open can return error value on error.
Check that value before calling fput & return proper error value

Signed-off-by: vibi sreenivasan <vibi_sreenivasan@cms.com>
---
security/integrity/ima/ima_main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index f4e7266..c58158b 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -201,10 +201,10 @@ int ima_path_check(struct path *path, int mask)
}
out:
mutex_unlock(&iint->mutex);
- if (file)
+ if (IS_ERR(file))
fput(file);
kref_put(&iint->refcount, iint_free);
- return 0;
+ return rc;
}

static int process_measurement(struct file *file, const unsigned char *filename,
--
1.6.0




\
 
 \ /
  Last update: 2009-06-01 08:27    [W:4.584 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site