diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 18:10:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 18:10:52 -0400 |
commit | a4531edd75522804dd2b268d8ccc5eaa70748011 (patch) | |
tree | 79d75a2f0e21c8f97e6a8ac25104bd726f48a9a8 | |
parent | 1d8674edb534a3c5cb549bfde5a39fa5598cb3bc (diff) |
Fix up lost patch in compat_sys_select() for new RCU files world order
Andrew lost this in patch reject resolution, and never noticed, since
the compat code isn't in use on x86.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/compat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/compat.c b/fs/compat.c index 8c665705c6a0..c2e0813164b4 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,8 @@ 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 | fdt = files_fdtable(current->files); |
1649 | max_fdset = fdt->max_fdset; | ||
1648 | if (n > max_fdset) | 1650 | if (n > max_fdset) |
1649 | n = max_fdset; | 1651 | n = max_fdset; |
1650 | 1652 | ||