[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1243836708.2163.3.camel@system>
Date: Mon, 01 Jun 2009 11:41:48 +0530
From: vibi sreenivasan <vibi_sreenivasan@....com>
To: Mimi Zohar <zohar@...ibm.com>
Cc: Kylene Hall <kylene@...ibm.com>, Serge Hallyn <serue@...ibm.com>,
Reiner Sailer <sailer@...son.ibm.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH]:Return proper error value on failure of dentry_open
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@....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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists