From: Vadim Lobanov Remove the OPEN_MAX component of the 'nfds' validity check within the poll() system call implementation. Although this change will be visible to userspace, I'll quote Ulrich Drepper for the rationale behind its validity: [The requirement that EINVAL must be returned if nfds is greater than OPEN_MAX] must be treated the same way as the EMFILE error in open(): ignore the OPEN_MAX limit if ulimit says so. The question is what to do if the ulimit < OPEN_MAX. POSIX does not require OPEN_MAX to be the exact limit. So, I think removing the OPEN_MAX comparison is the correct way to do this here. If somebody wants strict POSIX compliance they have to set ulimit -n to 256. Signed-off-by: Vadim Lobanov Cc: Ulrich Drepper Signed-off-by: Andrew Morton --- fs/select.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/select.c~remove-open_max-check-from-poll-syscall fs/select.c --- a/fs/select.c~remove-open_max-check-from-poll-syscall +++ a/fs/select.c @@ -671,7 +671,7 @@ int do_sys_poll(struct pollfd __user *uf fdt = files_fdtable(current->files); max_fdset = fdt->max_fdset; rcu_read_unlock(); - if (nfds > max_fdset && nfds > OPEN_MAX) + if (nfds > max_fdset) return -EINVAL; poll_initwait(&table); _