diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-08-18 23:37:42 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-08-18 23:37:42 +0000 |
commit | 794ff4dc959a8dfef4f704ef6a5bb7334e421623 (patch) | |
tree | 9ea4d7f31e69420a29819a7e4c88e4097aa4380f /arch/mips/mm | |
parent | 8b92ed51419c907aa453c063b0afaefaef268c02 (diff) |
- Drop support for 32/32 fp register model
- Fix siginfo structure definition
- Ptrace fixes, one of them was an uninitialized pointer.
- Header file fixes.
- Fixes to linker scripts required for new binutils.
- MIPS64. Chainsaw edition.
Btw, Harald, why does the kernel no longer compile ...
Diffstat (limited to 'arch/mips/mm')
-rw-r--r-- | arch/mips/mm/fault.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index fbcea015d..cacb97115 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c @@ -1,4 +1,4 @@ -/* $Id: fault.c,v 1.9 1999/01/04 16:03:53 ralf Exp $ +/* $Id: fault.c,v 1.10 1999/08/09 19:43:16 harald 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 @@ -83,7 +83,15 @@ good_area: if (!(vma->vm_flags & (VM_READ | VM_EXEC))) goto bad_area; } - handle_mm_fault(tsk, vma, address, writeaccess); + + /* + * If for any reason at all we couldn't handle the fault, + * make sure we exit gracefully rather than endlessly redo + * the fault. + */ + if (!handle_mm_fault(tsk, vma, address, writeaccess)) + goto do_sigbus; + up(&mm->mmap_sem); return; @@ -134,4 +142,22 @@ no_context: address, regs->cp0_epc, regs->regs[31]); die("Oops", regs, writeaccess); do_exit(SIGKILL); + +/* + * We ran out of memory, or some other thing happened to us that made + * us unable to handle the page fault gracefully. + */ +do_sigbus: + up(&mm->mmap_sem); + + /* + * Send a sigbus, regardless of whether we were in kernel + * or user mode. + */ + tsk->tss.cp0_badvaddr = address; + force_sig(SIGBUS, tsk); + + /* Kernel mode? Handle exceptions or die */ + if (!user_mode(regs)) + goto no_context; } |