aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/selinux/hooks.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 3f0b533be92c..acb5a495a902 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1594,6 +1594,7 @@ static inline void flush_unauthorized_files(struct files_struct * files)
1594 struct avc_audit_data ad; 1594 struct avc_audit_data ad;
1595 struct file *file, *devnull = NULL; 1595 struct file *file, *devnull = NULL;
1596 struct tty_struct *tty = current->signal->tty; 1596 struct tty_struct *tty = current->signal->tty;
1597 struct fdtable *fdt;
1597 long j = -1; 1598 long j = -1;
1598 1599
1599 if (tty) { 1600 if (tty) {
@@ -1627,9 +1628,10 @@ static inline void flush_unauthorized_files(struct files_struct * files)
1627 1628
1628 j++; 1629 j++;
1629 i = j * __NFDBITS; 1630 i = j * __NFDBITS;
1630 if (i >= files->max_fds || i >= files->max_fdset) 1631 fdt = files_fdtable(files);
1632 if (i >= fdt->max_fds || i >= fdt->max_fdset)
1631 break; 1633 break;
1632 set = files->open_fds->fds_bits[j]; 1634 set = fdt->open_fds->fds_bits[j];
1633 if (!set) 1635 if (!set)
1634 continue; 1636 continue;
1635 spin_unlock(&files->file_lock); 1637 spin_unlock(&files->file_lock);