summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/irixelf.c12
-rw-r--r--arch/mips/kernel/sysirix.c6
2 files changed, 5 insertions, 13 deletions
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c
index 78b41c448..ddf234045 100644
--- a/arch/mips/kernel/irixelf.c
+++ b/arch/mips/kernel/irixelf.c
@@ -717,16 +717,8 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs)
set_fs(old_fs);
kfree(elf_phdata);
- current->personality = PER_IRIX32;
-
- put_exec_domain(current->exec_domain);
- if (current->binfmt && current->binfmt->module)
- __MOD_DEC_USE_COUNT(current->binfmt->module);
- current->exec_domain = lookup_exec_domain(current->personality);
- current->binfmt = &irix_format;
- if (current->binfmt && current->binfmt->module)
- __MOD_INC_USE_COUNT(current->binfmt->module);
-
+ set_personality(PER_IRIX32);
+ set_binfmt(&irix_format);
compute_creds(bprm);
current->flags &= ~PF_FORKNOEXEC;
bprm->p = (unsigned long)
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c
index 742cc9b9d..db0229802 100644
--- a/arch/mips/kernel/sysirix.c
+++ b/arch/mips/kernel/sysirix.c
@@ -533,7 +533,7 @@ asmlinkage int irix_brk(unsigned long brk)
int ret;
lock_kernel();
- if (brk < current->mm->end_code) {
+ if (brk < mm->end_code) {
ret = -ENOMEM;
goto out;
}
@@ -549,9 +549,9 @@ asmlinkage int irix_brk(unsigned long brk)
/*
* Always allow shrinking brk
*/
- if (brk <= current->mm->brk) {
+ if (brk <= mm->brk) {
mm->brk = brk;
- do_munmap(newbrk, oldbrk-newbrk);
+ do_munmap(mm, newbrk, oldbrk-newbrk);
ret = 0;
goto out;
}