summaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-17 10:32:28 (GMT)
committerScott Wood <scottwood@freescale.com>2015-02-13 22:20:11 (GMT)
commit9a58969cf8c3f2a5cf3b0cf04144ca2573758d42 (patch)
tree314bd86e26d7f8c164b1cf70d794c3c8b0df61d6 /arch/sparc
parent8f5ce951e9a668c3b1c749fc6fee9e8b5dd4654b (diff)
downloadlinux-fsl-qoriq-9a58969cf8c3f2a5cf3b0cf04144ca2573758d42.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/sparc')
-rw-r--r--arch/sparc/mm/fault_32.c2
-rw-r--r--arch/sparc/mm/fault_64.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c
index 59dbd46..7d51c05 100644
--- a/arch/sparc/mm/fault_32.c
+++ b/arch/sparc/mm/fault_32.c
@@ -199,7 +199,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 603e462..c83c76d 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);