projects
/
profile
/
common
/
kernel-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ea5814
)
selinux: fix dentry_open() error check
author
Akinobu Mita
<akinobu.mita@gmail.com>
Mon, 27 Nov 2006 06:16:48 +0000
(15:16 +0900)
committer
James Morris
<jmorris@namei.org>
Mon, 27 Nov 2006 15:22:43 +0000
(10:22 -0500)
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>
Signed-off-by: James Morris <jmorris@namei.org>
security/selinux/hooks.c
patch
|
blob
|
history
diff --git
a/security/selinux/hooks.c
b/security/selinux/hooks.c
index
8ab5679
..
28ee187
100644
(file)
--- a/
security/selinux/hooks.c
+++ b/
security/selinux/hooks.c
@@
-1754,7
+1754,8
@@
static inline void flush_unauthorized_files(struct files_struct * files)
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;