patch-2.4.21 linux-2.4.21/fs/select.c

Next file: linux-2.4.21/fs/seq_file.c
Previous file: linux-2.4.21/fs/reiserfs/tail_conversion.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/fs/select.c linux-2.4.21/fs/select.c
@@ -417,7 +417,7 @@
 	int nchunks, nleft;
 
 	/* Do a sanity check on nfds ... */
-	if (nfds > NR_OPEN)
+	if (nfds > current->files->max_fdset && nfds > OPEN_MAX)
 		return -EINVAL;
 
 	if (timeout) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)