diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-17 11:32:28 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2015-06-18 18:16:03 -0400 |
commit | 2026d111f98d18a64cac1c8e2aba0c1c945b5d4a (patch) | |
tree | 38d5f6f4ff4f46c577fe9a297ef9730d94698207 /arch/sparc | |
parent | 22a8f4afd86db33d56831a68ccf3c912803a1459 (diff) | |
download | linux-rt-2026d111f98d18a64cac1c8e2aba0c1c945b5d4a.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>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/mm/fault_32.c | 2 | ||||
-rw-r--r-- | arch/sparc/mm/fault_64.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c index 70d817154fe8..e8adda91e74e 100644 --- a/arch/sparc/mm/fault_32.c +++ b/arch/sparc/mm/fault_32.c @@ -196,7 +196,7 @@ 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) + 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 479823249429..c43fdcbcf804 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c @@ -330,7 +330,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); |