diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-04 00:49:14 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-04 00:49:14 +0200 |
commit | 87e8b821ed8db3dab03d96cd542e29666bf210aa (patch) | |
tree | 0027060473aafbbb125655ba027319c8a1a665fc /fs/select.c | |
parent | sparc64: Fix array size reported by vmemmap_populate() (diff) | |
parent | Merge master.kernel.org:/home/rmk/linux-2.6-arm (diff) | |
download | linux-87e8b821ed8db3dab03d96cd542e29666bf210aa.tar.xz linux-87e8b821ed8db3dab03d96cd542e29666bf210aa.zip |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'fs/select.c')
-rw-r--r-- | fs/select.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/fs/select.c b/fs/select.c index fd38ce2e32e3..500a669f7790 100644 --- a/fs/select.c +++ b/fs/select.c @@ -691,6 +691,23 @@ SYSCALL_DEFINE6(pselect6, int, n, fd_set __user *, inp, fd_set __user *, outp, } #endif /* HAVE_SET_RESTORE_SIGMASK */ +#ifdef __ARCH_WANT_SYS_OLD_SELECT +struct sel_arg_struct { + unsigned long n; + fd_set __user *inp, *outp, *exp; + struct timeval __user *tvp; +}; + +SYSCALL_DEFINE1(old_select, struct sel_arg_struct __user *, arg) +{ + struct sel_arg_struct a; + + if (copy_from_user(&a, arg, sizeof(a))) + return -EFAULT; + return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp); +} +#endif + struct poll_list { struct poll_list *next; int len; @@ -821,7 +838,7 @@ int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, struct poll_list *walk = head; unsigned long todo = nfds; - if (nfds > current->signal->rlim[RLIMIT_NOFILE].rlim_cur) + if (nfds > rlimit(RLIMIT_NOFILE)) return -EINVAL; len = min_t(unsigned int, nfds, N_STACK_PPS); |