From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Stephen Smalley <sds@tycho.nsa.gov>, James Morris <jmorris@namei.org>
Subject: [PATCH] selinux: fix dentry_open() error check
Date: Mon, 27 Nov 2006 15:16:48 +0900 [thread overview]
Message-ID: <20061127061648.GA20065@APFDCB5C> (raw)
The return value of dentry_open() shoud be checked by IS_ERR().
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
security/selinux/hooks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: work-fault-inject/security/selinux/hooks.c
===================================================================
--- work-fault-inject.orig/security/selinux/hooks.c
+++ work-fault-inject/security/selinux/hooks.c
@@ -1760,7 +1760,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;
next reply other threads:[~2006-11-27 6:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-27 6:16 Akinobu Mita [this message]
2006-11-27 6:35 ` Christoph Hellwig
2006-11-27 6:58 ` Akinobu Mita
2006-11-27 15:29 ` James Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061127061648.GA20065@APFDCB5C \
--to=akinobu.mita@gmail.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome