summaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/fault.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-18 00:24:27 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-18 00:24:27 +0000
commitb9558d5f86c471a125abf1fb3a3882fb053b1f8c (patch)
tree707b53ec64e740a7da87d5f36485e3cd9b1c794e /arch/mips/mm/fault.c
parentb3ac367c7a3e6047abe74817db27e34e759f279f (diff)
Merge with Linux 2.3.41.
Diffstat (limited to 'arch/mips/mm/fault.c')
-rw-r--r--arch/mips/mm/fault.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index cfcfc9c8b..263f2c919 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -1,4 +1,4 @@
-/* $Id: fault.c,v 1.14 1999/12/04 03:59:00 ralf Exp $
+/* $Id: fault.c,v 1.15 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
@@ -47,6 +47,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write,
struct vm_area_struct * vma;
struct task_struct *tsk = current;
struct mm_struct *mm = tsk->mm;
+ int si_code = SEGV_MAPERR;
unsigned long fixup;
/*
@@ -74,6 +75,8 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write,
* we can handle it..
*/
good_area:
+ si_code = SEGV_ACCERR;
+
if (write) {
if (!(vma->vm_flags & VM_WRITE))
goto bad_area;
@@ -106,6 +109,7 @@ bad_area:
up(&mm->mmap_sem);
if (user_mode(regs)) {
+ struct siginfo si;
tsk->thread.cp0_badvaddr = address;
tsk->thread.error_code = write;
#if 0
@@ -117,7 +121,10 @@ bad_area:
(unsigned long) regs->cp0_epc,
(unsigned long) regs->regs[31]);
#endif
- force_sig(SIGSEGV, tsk);
+ si.si_signo = SIGSEGV;
+ si.si_code = si_code;
+ si.si_addr = (void *) address;
+ force_sig_info(SIGSEGV, &si, tsk);
return;
}