aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/compat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/compat.c b/fs/compat.c
index c2e0813164b4..ac3fb9ed8eea 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -1645,8 +1645,10 @@ compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp
1645 goto out_nofds; 1645 goto out_nofds;
1646 1646
1647 /* max_fdset can increase, so grab it once to avoid race */ 1647 /* max_fdset can increase, so grab it once to avoid race */
1648 rcu_read_lock();
1648 fdt = files_fdtable(current->files); 1649 fdt = files_fdtable(current->files);
1649 max_fdset = fdt->max_fdset; 1650 max_fdset = fdt->max_fdset;
1651 rcu_read_unlock();
1650 if (n > max_fdset) 1652 if (n > max_fdset)
1651 n = max_fdset; 1653 n = max_fdset;
1652 1654