From 1d67e90f19a7acfd9a05dc59678e7d0c5090bd0d Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 4 Dec 1999 03:58:56 +0000 Subject: Merge with Linux 2.3.21. --- arch/mips/kernel/syscall.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'arch/mips/kernel/syscall.c') diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 05e1fea1e..fbf2539c5 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c @@ -1,4 +1,4 @@ -/* $Id: syscall.c,v 1.10 1999/02/15 02:16:52 ralf Exp $ +/* $Id: syscall.c,v 1.11 1999/10/09 00:00:58 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -61,6 +61,7 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, int prot, struct file * file = NULL; unsigned long error = -EFAULT; + down(¤t->mm->mmap_sem); lock_kernel(); if (!(flags & MAP_ANONYMOUS)) { error = -EBADF; @@ -69,11 +70,14 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, int prot, goto out; } flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); + error = do_mmap(file, addr, len, prot, flags, offset); if (file) fput(file); out: unlock_kernel(); + up(¤t->mm->mmap_sem); + return error; } -- cgit v1.2.3