patch-2.4.1 linux/arch/ppc/mm/fault.c
Next file: linux/arch/ppc/mm/init.c
Previous file: linux/arch/ppc/mbxboot/vmlinux.lds
Back to the patch index
Back to the overall index
- Lines: 73
- Date:
Mon Jan 22 15:41:15 2001
- Orig file:
v2.4.0/linux/arch/ppc/mm/fault.c
- Orig date:
Sun Sep 17 09:48:07 2000
diff -u --recursive --new-file v2.4.0/linux/arch/ppc/mm/fault.c linux/arch/ppc/mm/fault.c
@@ -48,7 +48,7 @@
unsigned int probingmem = 0;
extern void die_if_kernel(char *, struct pt_regs *, long);
-void bad_page_fault(struct pt_regs *, unsigned long);
+void bad_page_fault(struct pt_regs *, unsigned long, int sig);
void do_page_fault(struct pt_regs *, unsigned long, unsigned long);
/*
@@ -96,7 +96,7 @@
#endif /* CONFIG_XMON || CONFIG_KGDB */
if (in_interrupt() || mm == NULL) {
- bad_page_fault(regs, address);
+ bad_page_fault(regs, address, SIGSEGV);
return;
}
down(&mm->mmap_sem);
@@ -182,7 +182,7 @@
return;
}
- bad_page_fault(regs, address);
+ bad_page_fault(regs, address, SIGSEGV);
return;
/*
@@ -194,7 +194,7 @@
printk("VM: killing process %s\n", current->comm);
if (user_mode(regs))
do_exit(SIGKILL);
- bad_page_fault(regs, address);
+ bad_page_fault(regs, address, SIGKILL);
return;
do_sigbus:
@@ -205,7 +205,7 @@
info.si_addr = (void *)address;
force_sig_info (SIGBUS, &info, current);
if (!user_mode(regs))
- bad_page_fault(regs, address);
+ bad_page_fault(regs, address, SIGBUS);
}
/*
@@ -214,8 +214,10 @@
* in traps.c.
*/
void
-bad_page_fault(struct pt_regs *regs, unsigned long address)
+bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
{
+ extern void die(const char *,struct pt_regs *,long);
+
unsigned long fixup;
/* Are we prepared to handle this fault? */
@@ -225,14 +227,11 @@
}
/* kernel has accessed a bad area */
- show_regs(regs);
#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);
+ die("kernel access of bad area", regs, sig);
}
#ifdef CONFIG_8xx
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)