diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-17 11:32:28 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-04-24 21:44:44 -0400 |
commit | aafe4b955cc8f49a6058140a22811371746411d4 (patch) | |
tree | 01d883bf9ae5493217a1404389e368d6ac1f1505 /arch/s390 | |
parent | fccf774db21123fd18acbaea9f0c1adf986a38c6 (diff) | |
download | linux-rt-aafe4b955cc8f49a6058140a22811371746411d4.tar.gz |
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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index fc6679210d83..a4742e92e8d4 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; @@ -442,7 +443,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); |