From b9558d5f86c471a125abf1fb3a3882fb053b1f8c Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 18 Feb 2000 00:24:27 +0000 Subject: Merge with Linux 2.3.41. --- arch/mips/mm/fault.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'arch/mips/mm') 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; } -- cgit v1.2.3