diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-17 11:32:28 +0100 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-03-13 12:39:49 -0500 |
commit | 369a8920ed85cfffad8479f1e4c7855a2b5aa1e1 (patch) | |
tree | cfa4dba0ffff7db807198f881b4cbbc91ba4a3e9 /arch/sparc | |
parent | f3fbe4626c25f9ba73b0decf8cc22dbddd37370c (diff) |
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/sparc')
-rw-r--r-- | arch/sparc/mm/fault_32.c | 4 | ||||
-rw-r--r-- | arch/sparc/mm/fault_64.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c index 8023fd7e77b5..e0742c12d1fd 100644 --- a/arch/sparc/mm/fault_32.c +++ b/arch/sparc/mm/fault_32.c @@ -247,8 +247,8 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write, * If we're in an interrupt or have no user * context, we must not take the fault.. */ - if (in_atomic() || !mm) - goto no_context; + if (in_atomic() || !mm || current->pagefault_disabled) + goto no_context; perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c index 504c0622f729..9d691a5ca014 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c @@ -322,7 +322,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) * If we're in an interrupt or have no user * context, we must not take the fault.. */ - if (in_atomic() || !mm) + if (in_atomic() || !mm || current->pagefault_enabled) goto intr_or_no_mm; perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); |