summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/sys_arm.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
commit86464aed71025541805e7b1515541aee89879e33 (patch)
treee01a457a4912a8553bc65524aa3125d51f29f810 /arch/arm/kernel/sys_arm.c
parent88f99939ecc6a95a79614574cb7d95ffccfc3466 (diff)
Merge with Linux 2.2.1.
Diffstat (limited to 'arch/arm/kernel/sys_arm.c')
-rw-r--r--arch/arm/kernel/sys_arm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c
index 56ada1dc7..5996398f8 100644
--- a/arch/arm/kernel/sys_arm.c
+++ b/arch/arm/kernel/sys_arm.c
@@ -77,7 +77,8 @@ asmlinkage int old_mmap(struct mmap_arg_struct *arg)
goto out;
if (!(a.flags & MAP_ANONYMOUS)) {
error = -EBADF;
- if (a.fd >= NR_OPEN || !(file = current->files->fd[a.fd]))
+ if (a.fd >= current->files->max_fds ||
+ !(file = current->files->fd[a.fd]))
goto out;
}
a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);