aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arc/mm/fault.c')
-rw-r--r--arch/arc/mm/fault.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/arc/mm/fault.c b/arch/arc/mm/fault.c
index a1d723197084..8df1638259f3 100644
--- a/arch/arc/mm/fault.c
+++ b/arch/arc/mm/fault.c
@@ -141,12 +141,17 @@ good_area:
141 */ 141 */
142 fault = handle_mm_fault(vma, address, flags); 142 fault = handle_mm_fault(vma, address, flags);
143 143
144 /* If Pagefault was interrupted by SIGKILL, exit page fault "early" */
145 if (fatal_signal_pending(current)) { 144 if (fatal_signal_pending(current)) {
146 if ((fault & VM_FAULT_ERROR) && !(fault & VM_FAULT_RETRY)) 145
147 up_read(&mm->mmap_sem); 146 /*
148 if (user_mode(regs)) 147 * if fault retry, mmap_sem already relinquished by core mm
148 * so OK to return to user mode (with signal handled first)
149 */
150 if (fault & VM_FAULT_RETRY) {
151 if (!user_mode(regs))
152 goto no_context;
149 return; 153 return;
154 }
150 } 155 }
151 156
152 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); 157 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);