diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-14 08:19:08 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-14 08:19:08 -0400 |
commit | 905ec87e93bc9e01b15c60035cd6a50c636cbaef (patch) | |
tree | 46fd7618d6511611ffc19eb0dd4d7bc6b90a41c2 /fs/compat.c | |
parent | 1d6ae775d7a948c9575658eb41184fd2e506c0df (diff) | |
parent | 2f4ba45a75d6383b4a1201169a808ffea416ffa0 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'fs/compat.c')
-rw-r--r-- | fs/compat.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/compat.c b/fs/compat.c index 8c665705c6a0..ac3fb9ed8eea 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -1619,6 +1619,7 @@ compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp | |||
1619 | char *bits; | 1619 | char *bits; |
1620 | long timeout; | 1620 | long timeout; |
1621 | int size, max_fdset, ret = -EINVAL; | 1621 | int size, max_fdset, ret = -EINVAL; |
1622 | struct fdtable *fdt; | ||
1622 | 1623 | ||
1623 | timeout = MAX_SCHEDULE_TIMEOUT; | 1624 | timeout = MAX_SCHEDULE_TIMEOUT; |
1624 | if (tvp) { | 1625 | if (tvp) { |
@@ -1644,7 +1645,10 @@ compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp | |||
1644 | goto out_nofds; | 1645 | goto out_nofds; |
1645 | 1646 | ||
1646 | /* max_fdset can increase, so grab it once to avoid race */ | 1647 | /* max_fdset can increase, so grab it once to avoid race */ |
1647 | max_fdset = current->files->max_fdset; | 1648 | rcu_read_lock(); |
1649 | fdt = files_fdtable(current->files); | ||
1650 | max_fdset = fdt->max_fdset; | ||
1651 | rcu_read_unlock(); | ||
1648 | if (n > max_fdset) | 1652 | if (n > max_fdset) |
1649 | n = max_fdset; | 1653 | n = max_fdset; |
1650 | 1654 | ||