summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2009-07-16 16:00:49 +0200
committerMichal Simek <monstr@monstr.eu>2009-07-27 07:39:55 +0200
commitf10eca6e107fd223c24393c09c40b916d2b3c427 (patch)
treebd205ccdc9c810c51f46ef974cc39a5cf546ff67 /arch
parentf14d6f7c31c73a902a6b567dc719128e74603902 (diff)
downloadlinux-f10eca6e107fd223c24393c09c40b916d2b3c427.tar.bz2
microblaze: Fix do_page_fault for no context
Calling fixup when we are in kernel mode. This prevent fault for copy_to/from_user. This fault was find thanks to writev01/03/04 LTP tests. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch')
-rw-r--r--arch/microblaze/mm/fault.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/microblaze/mm/fault.c b/arch/microblaze/mm/fault.c
index 956607a63f4c..398c76117355 100644
--- a/arch/microblaze/mm/fault.c
+++ b/arch/microblaze/mm/fault.c
@@ -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 "