patch-2.3.12 linux/arch/sparc64/solaris/timod.c

Next file: linux/drivers/Makefile
Previous file: linux/arch/sparc64/mm/fault.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.11/linux/arch/sparc64/solaris/timod.c linux/arch/sparc64/solaris/timod.c
@@ -866,7 +866,7 @@
 
 	SOLD("entry");
 	lock_kernel();
-	if(fd >= NR_OPEN) goto out;
+	if(fd >= current->files->max_fds) goto out;
 
 	filp = current->files->fd[fd];
 	if(!filp) goto out;
@@ -933,7 +933,7 @@
 
 	SOLD("entry");
 	lock_kernel();
-	if(fd >= NR_OPEN) goto out;
+	if(fd >= current->files->max_fds) goto out;
 
 	filp = current->files->fd[fd];
 	if(!filp) goto out;

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