patch-2.2.10 linux/fs/select.c
Next file: linux/fs/smbfs/inode.c
Previous file: linux/fs/nfs/read.c
Back to the patch index
Back to the overall index
-  Lines: 14
 -  Date:
Sun May 23 23:54:52 1999
 -  Orig file: 
v2.2.9/linux/fs/select.c
 -  Orig date: 
Wed Jan 20 23:14:06 1999
 
diff -u --recursive --new-file v2.2.9/linux/fs/select.c linux/fs/select.c
@@ -268,8 +268,12 @@
 	}
 
 	ret = -EINVAL;
-	if (n < 0 || n > KFDS_NR)
+	if (n < 0)
 		goto out_nofds;
+
+	if (n > KFDS_NR)
+		n = KFDS_NR;
+
 	/*
 	 * We need 6 bitmaps (in/out/ex for both incoming and outgoing),
 	 * since we used fdset we need to allocate memory in units of
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)