The one line fix was to his program, not the kernel. The bug seems to
exists in every Linux kernel that supports poll.
The bogus sanity check is in fs/select.h:
err = -EINVAL;
if (nfds > current->files->max_fds)
goto out;
The current maximum number of file descriptors is irrelevant. It's not
unusual for a program to create a poll structure with as many entries as it
plans to use in the future and set the unused entries to fd=-1. This check
causes such programs to fail on Linux.
DS
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/