aboutsummaryrefslogtreecommitdiff
path: root/arch/microblaze/mm/fault.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-07-29 20:28:08 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2009-07-29 20:28:08 +0200
commitb4093d6235b7e4249616651ee328600ced48a18a (patch)
tree9f5b8e466e2d26fbe13ee7934f9e939a09815bd5 /arch/microblaze/mm/fault.c
parentd9ab77161d811ffb0bccf396f7155cc905c1b9e1 (diff)
parent7d3e91b8a1f5179d56a7412d4b499f2d5fc6b25d (diff)
Merge branch 'master' into for-linus
Diffstat (limited to 'arch/microblaze/mm/fault.c')
-rw-r--r--arch/microblaze/mm/fault.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/microblaze/mm/fault.c b/arch/microblaze/mm/fault.c
index 956607a63f4..d9d249a66ff 100644
--- a/arch/microblaze/mm/fault.c
+++ b/arch/microblaze/mm/fault.c
@@ -69,7 +69,7 @@ static int store_updates_sp(struct pt_regs *regs)
* It is called from do_page_fault above and from some of the procedures
* in traps.c.
*/
-static void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
+void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
{
const struct exception_table_entry *fixup;
/* MS: no context */
@@ -122,15 +122,10 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
}
#endif /* CONFIG_KGDB */
- if (in_atomic() || mm == NULL) {
- /* FIXME */
- if (kernel_mode(regs)) {
- printk(KERN_EMERG
- "Page fault in kernel mode - Oooou!!! pid %d\n",
- current->pid);
- _exception(SIGSEGV, regs, code, address);
- return;
- }
+ if (in_atomic() || !mm) {
+ if (kernel_mode(regs))
+ goto bad_area_nosemaphore;
+
/* in_atomic() in user mode is really bad,
as is current->mm == NULL. */
printk(KERN_EMERG "Page fault in user mode with "