summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@nuclecu.unam.mx>1997-08-26 04:33:29 +0000
committerMiguel de Icaza <miguel@nuclecu.unam.mx>1997-08-26 04:33:29 +0000
commitc399d60bf54f28c429413290e83d6c1e859c737d (patch)
tree5cadbca7595164c25e19b17ee21f38b0974d407c /arch
parentc80e6a7c09bf680ae88e80fe28c61012c3e0add9 (diff)
fix for the irix elf loader
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/irixelf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c
index dabd91762..fc166a7de 100644
--- a/arch/mips/kernel/irixelf.c
+++ b/arch/mips/kernel/irixelf.c
@@ -473,9 +473,8 @@ static inline int look_for_irix_interpreter(char **name,
retval = PTR_ERR(dentry);
goto out;
}
-
retval = read_exec(dentry, 0, bprm->buf, 128, 1);
- if(retval)
+ if(retval < 0)
goto dput_and_out;
*interp_elf_ex = *((struct elfhdr *) bprm->buf);
@@ -648,7 +647,7 @@ static inline int do_load_irix_binary(struct linux_binprm * bprm,
start_code = 0xffffffff;
end_code = 0;
end_data = 0;
-
+
retval = look_for_irix_interpreter(&elf_interpreter,
&interpreter_dentry,
&interp_elf_ex, elf_phdata, bprm,
@@ -723,6 +722,7 @@ static inline int do_load_irix_binary(struct linux_binprm * bprm,
}
}
+
set_fs(old_fs);
kfree(elf_phdata);