summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-17 10:32:28 (GMT)
committerEmil Medve <Emilian.Medve@Freescale.com>2013-04-30 08:16:56 (GMT)
commit1d24a2ea21323c00e8b143b170fe1db68b591675 (patch)
treea8a436870022f7984da7fe67f915d3dcb856856f /arch/s390
parent0f6faa2ae9ba93eb01cefa34dcfb9ba305a33ea8 (diff)
downloadlinux-fsl-qoriq-1d24a2ea21323c00e8b143b170fe1db68b591675.tar.xz
mm: Fixup all fault handlers to check current->pagefault_disable
Necessary for decoupling pagefault disable from preempt count. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/mm/fault.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 2fb9e63..a5fb7bc 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -296,7 +296,8 @@ static inline int do_exception(struct pt_regs *regs, int access)
* user context.
*/
fault = VM_FAULT_BADCONTEXT;
- if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm))
+ if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm ||
+ tsk->pagefault_disabled))
goto out;
address = trans_exc_code & __FAIL_ADDR_MASK;
@@ -435,7 +436,8 @@ void __kprobes do_asce_exception(struct pt_regs *regs)
clear_tsk_thread_flag(current, TIF_PER_TRAP);
trans_exc_code = regs->int_parm_long;
- if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm))
+ if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm ||
+ current->pagefault_disabled()));
goto no_context;
down_read(&mm->mmap_sem);