summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-07 15:45:24 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-07 15:45:24 +0000
commit9f9f3e6e8548a596697778337110a423c384b6f3 (patch)
tree5dd4b290ef532cf5ecb058e1a92cd3435afeac8c /arch/mips/kernel
parentd5c9a365ee7d2fded249aa5abfc5e89587583029 (diff)
Merge with Linux 2.3.49.
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/irixelf.c25
-rw-r--r--arch/mips/kernel/r2300_misc.S4
-rw-r--r--arch/mips/kernel/syscall.c4
-rw-r--r--arch/mips/kernel/sysirix.c4
-rw-r--r--arch/mips/kernel/time.c3
5 files changed, 22 insertions, 18 deletions
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c
index 41ea11b98..fa9e68e6f 100644
--- a/arch/mips/kernel/irixelf.c
+++ b/arch/mips/kernel/irixelf.c
@@ -1,4 +1,4 @@
-/* $Id: irixelf.c,v 1.24 2000/02/04 07:40:23 ralf Exp $
+/* $Id: irixelf.c,v 1.25 2000/03/02 02:36:50 ralf Exp $
*
* irixelf.c: Code to load IRIX ELF executables which conform to
* the MIPS ABI.
@@ -29,6 +29,7 @@
#include <linux/shm.h>
#include <linux/personality.h>
#include <linux/elfcore.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/pgalloc.h>
@@ -449,29 +450,31 @@ static inline int look_for_irix_interpreter(char **name,
*name = NULL;
for(i = 0; i < pnum; i++, epp++) {
- if(epp->p_type != PT_INTERP)
+ if (epp->p_type != PT_INTERP)
continue;
/* It is illegal to have two interpreters for one executable. */
- if(*name != NULL)
+ if (*name != NULL)
goto out;
*name = (char *) kmalloc((epp->p_filesz +
strlen(IRIX_INTERP_PREFIX)),
GFP_KERNEL);
- if(!*name)
+ if (!*name)
return -ENOMEM;
strcpy(*name, IRIX_INTERP_PREFIX);
retval = read_exec(bprm->dentry, epp->p_offset, (*name + 16),
epp->p_filesz, 1);
- if(retval < 0)
+ if (retval < 0)
goto out;
old_fs = get_fs(); set_fs(get_ds());
+ lock_kernel();
dentry = namei(*name);
+ unlock_kernel();
set_fs(old_fs);
- if(IS_ERR(dentry)) {
+ if (IS_ERR(dentry)) {
retval = PTR_ERR(dentry);
goto out;
}
@@ -485,7 +488,9 @@ static inline int look_for_irix_interpreter(char **name,
return 0;
dput_and_out:
+ lock_kernel();
dput(dentry);
+ unlock_kernel();
out:
kfree(*name);
return retval;
@@ -566,7 +571,9 @@ static inline int map_interpreter(struct elf_phdr *epp, struct elfhdr *ihp,
old_fs = get_fs();
set_fs(get_ds());
+ lock_kernel();
dput(identry);
+ unlock_kernel();
if(*eentry == 0xffffffff)
return -1;
@@ -682,10 +689,10 @@ static inline int do_load_irix_binary(struct linux_binprm * bprm,
&interpreter_dentry,
&interp_elf_ex, elf_phdata, bprm,
elf_ex.e_phnum);
- if(retval)
+ if (retval)
goto out_free_file;
- if(elf_interpreter) {
+ if (elf_interpreter) {
retval = verify_irix_interpreter(&interp_elf_ex);
if(retval)
goto out_free_interp;
@@ -811,7 +818,9 @@ out:
return retval;
out_free_dentry:
+ lock_kernel();
dput(interpreter_dentry);
+ unlock_kernel();
out_free_interp:
if (elf_interpreter)
kfree(elf_interpreter);
diff --git a/arch/mips/kernel/r2300_misc.S b/arch/mips/kernel/r2300_misc.S
index 149012a1f..30031e295 100644
--- a/arch/mips/kernel/r2300_misc.S
+++ b/arch/mips/kernel/r2300_misc.S
@@ -1,4 +1,4 @@
-/* $Id: r2300_misc.S,v 1.7 1999/10/09 00:00:58 ralf Exp $
+/* $Id: r2300_misc.S,v 1.8 1999/12/08 22:05:10 harald Exp $
* misc.S: Misc. exception handling code for R3000/R2000.
*
* Copyright (C) 1994, 1995, 1996 by Ralf Baechle and Andreas Busse
@@ -10,8 +10,6 @@
* Copyright (c) 1998 Harald Koerfgen
* Copyright (c) 1998, 1999 Gleb Raiko & Vladimir Roganov
*/
-#include <linux/config.h>
-
#include <asm/asm.h>
#include <asm/current.h>
#include <asm/bootinfo.h>
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 0f5124280..d2df0dc20 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -1,4 +1,4 @@
-/* $Id: syscall.c,v 1.12 1999/12/04 03:59:00 ralf Exp $
+/* $Id: syscall.c,v 1.13 2000/02/04 07:40:23 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
@@ -129,7 +129,6 @@ asmlinkage int sys_execve(struct pt_regs regs)
int error;
char * filename;
- lock_kernel();
filename = getname((char *) (long)regs.regs[4]);
error = PTR_ERR(filename);
if (IS_ERR(filename))
@@ -139,7 +138,6 @@ asmlinkage int sys_execve(struct pt_regs regs)
putname(filename);
out:
- unlock_kernel();
return error;
}
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c
index 362d6a760..0c07b8dd6 100644
--- a/arch/mips/kernel/sysirix.c
+++ b/arch/mips/kernel/sysirix.c
@@ -1,4 +1,4 @@
-/* $Id: sysirix.c,v 1.23 2000/02/04 07:40:23 ralf Exp $
+/* $Id: sysirix.c,v 1.24 2000/02/05 06:47:08 ralf Exp $
*
* sysirix.c: IRIX system call emulation.
*
@@ -878,7 +878,6 @@ asmlinkage int irix_exec(struct pt_regs *regs)
int error, base = 0;
char *filename;
- lock_kernel();
if(regs->regs[2] == 1000)
base = 1;
filename = getname((char *) (long)regs->regs[base + 4]);
@@ -890,7 +889,6 @@ asmlinkage int irix_exec(struct pt_regs *regs)
putname(filename);
out:
- unlock_kernel();
return error;
}
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index a35da14d2..ea36ed5b2 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -1,4 +1,4 @@
-/* $Id: time.c,v 1.13 1999/10/09 00:00:58 ralf Exp $
+/* $Id: time.c,v 1.14 2000/01/26 00:07:44 ralf Exp $
*
* Copyright (C) 1991, 1992, 1995 Linus Torvalds
* Copyright (C) 1996, 1997, 1998 Ralf Baechle
@@ -6,6 +6,7 @@
* This file contains the time handling details for PC-style clocks as
* found in some MIPS systems.
*/
+#include <linux/config.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/sched.h>