summaryrefslogtreecommitdiffstats
path: root/arch/ppc/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc/mm/fault.c')
-rw-r--r--arch/ppc/mm/fault.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c
index fde053df9..524087541 100644
--- a/arch/ppc/mm/fault.c
+++ b/arch/ppc/mm/fault.c
@@ -89,13 +89,9 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
printk("page fault in interrupt handler, addr=%lx\n",
address);
show_regs(regs);
-#if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
- if (debugger_kernel_faults)
- debugger(regs);
-#endif
}
}
- if (current == NULL) {
+ if (current == NULL || mm == NULL) {
bad_page_fault(regs, address);
return;
}
@@ -161,6 +157,7 @@ void
bad_page_fault(struct pt_regs *regs, unsigned long address)
{
unsigned long fixup;
+
if (user_mode(regs)) {
force_sig(SIGSEGV, current);
return;
@@ -174,11 +171,11 @@ bad_page_fault(struct pt_regs *regs, unsigned long address)
/* kernel has accessed a bad area */
show_regs(regs);
- print_backtrace( (unsigned long *)regs->gpr[1] );
#if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
if (debugger_kernel_faults)
debugger(regs);
#endif
+ print_backtrace( (unsigned long *)regs->gpr[1] );
panic("kernel access of bad area pc %lx lr %lx address %lX tsk %s/%d",
regs->nip,regs->link,address,current->comm,current->pid);
}