diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-11-28 17:32:35 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-11-28 17:32:35 -0800 |
commit | 691ce26e4066147ab75366307c5c65d26c7fd805 (patch) | |
tree | b8123daa92c4fa8529a9cba2d61742b7387942d8 | |
parent | 707badb80b90d15d97f46155e6af432bd52789a3 (diff) | |
parent | fc5d81e69d15c65ca20d9e5b4e242690e3e9c27d (diff) | |
download | linux-stable-691ce26e4066147ab75366307c5c65d26c7fd805.tar.gz linux-stable-691ce26e4066147ab75366307c5c65d26c7fd805.tar.bz2 linux-stable-691ce26e4066147ab75366307c5c65d26c7fd805.zip |
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
selinux: fix dentry_open() error check
-rw-r--r-- | security/selinux/hooks.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 8ab5679a37a3..28ee187ed224 100644 --- 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; |