Messages in this thread Patch in this message | | | Subject | [PATCH]:Return proper error value on failure of dentry_open | From | vibi sreenivasan <> | Date | Mon, 01 Jun 2009 11:41:48 +0530 |
| |
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
| |