commit fc5d81e69d15c65ca20d9e5b4e242690e3e9c27d
tree 487e7c5e25fb91246712747cc9595f750cffa30b
parent 2ea5814472c3c910aed5c5b60f1f3b1000e353f1
author Akinobu Mita <[EMAIL PROTECTED]> 1164608208 +0900
committer James Morris <[EMAIL PROTECTED]> 1164640963 -0500

selinux: fix dentry_open() error check

The return value of dentry_open() shoud be checked by IS_ERR().

Cc: Stephen Smalley <[EMAIL PROTECTED]>
Cc: James Morris <[EMAIL PROTECTED]>
Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]>
Signed-off-by: James Morris <[EMAIL PROTECTED]>

 security/selinux/hooks.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 8ab5679..28ee187 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1754,7 +1754,8 @@ static inline void flush_unauthorized_fi
                                                get_file(devnull);
                                        } else {
                                                devnull = 
dentry_open(dget(selinux_null), mntget(selinuxfs_mount), O_RDWR);
-                                               if (!devnull) {
+                                               if (IS_ERR(devnull)) {
+                                                       devnull = NULL;
                                                        put_unused_fd(fd);
                                                        fput(file);
                                                        continue;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to