summaryrefslogtreecommitdiff
blob: 388d9b600ee98e2918a3c719b1df81409c5900ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
diff -urN 2.4.9/fs/select.c poll/fs/select.c
--- 2.4.9/fs/select.c	Thu Aug 16 22:03:38 2001
+++ poll/fs/select.c	Sat Aug 18 03:09:11 2001
@@ -416,7 +416,7 @@
 	int nchunks, nleft;
 
 	/* Do a sanity check on nfds ... */
-	if (nfds > NR_OPEN)
+	if (nfds > current->rlim[RLIMIT_NOFILE].rlim_cur)
 		return -EINVAL;
 
 	if (timeout) {