patch-2.4.19 linux-2.4.19/fs/fcntl.c

Next file: linux-2.4.19/fs/file.c
Previous file: linux-2.4.19/fs/fat/inode.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/fs/fcntl.c linux-2.4.19/fs/fcntl.c
@@ -66,6 +66,10 @@
 
 	write_lock(&files->file_lock);
 	
+	error = -EINVAL;
+	if (orig_start >= current->rlim[RLIMIT_NOFILE].rlim_cur)
+		goto out;
+
 repeat:
 	/*
 	 * Someone might have closed fd's in the range
@@ -409,7 +413,7 @@
 			   back to SIGIO in that case. --sct */
 			si.si_signo = fown->signum;
 			si.si_errno = 0;
-		        si.si_code  = reason & ~__SI_MASK;
+		        si.si_code  = reason;
 			/* Make sure we are called with one of the POLL_*
 			   reasons, otherwise we could leak kernel stack into
 			   userspace.  */

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