summaryrefslogtreecommitdiffstats
path: root/arch/i386/mm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-07-20 14:56:40 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-07-20 14:56:40 +0000
commite308faf24f68e262d92d294a01ddca7a17e76762 (patch)
tree22c47cb315811834861f013067878ff664e95abd /arch/i386/mm
parent30c6397ce63178fcb3e7963ac247f0a03132aca9 (diff)
Sync with Linux 2.1.46.
Diffstat (limited to 'arch/i386/mm')
-rw-r--r--arch/i386/mm/fault.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
index b0404a6a9..e4847c070 100644
--- a/arch/i386/mm/fault.c
+++ b/arch/i386/mm/fault.c
@@ -161,23 +161,25 @@ good_area:
bad_area:
up(&mm->mmap_sem);
- /* Are we prepared to handle this fault? */
+ /* User mode accesses just cause a SIGSEGV */
+ if (error_code & 4) {
+ tsk->tss.cr2 = address;
+ tsk->tss.error_code = error_code;
+ tsk->tss.trap_no = 14;
+ force_sig(SIGSEGV, tsk);
+ goto out;
+ }
+
+ /* Are we prepared to handle this kernel fault? */
if ((fixup = search_exception_table(regs->eip)) != 0) {
printk(KERN_DEBUG "%s: Exception at [<%lx>] (%lx)\n",
- current->comm,
+ tsk->comm,
regs->eip,
fixup);
regs->eip = fixup;
goto out;
}
- if (error_code & 4) {
- tsk->tss.cr2 = address;
- tsk->tss.error_code = error_code;
- tsk->tss.trap_no = 14;
- force_sig(SIGSEGV, tsk);
- goto out;
- }
/*
* Oops. The kernel tried to access some bad page. We'll have to
* terminate things with extreme prejudice.