|
|
@@ -143,12 +143,17 @@ good_area:
|
|
|
*/
|
|
|
fault = handle_mm_fault(vma, address, flags);
|
|
|
|
|
|
- /* If Pagefault was interrupted by SIGKILL, exit page fault "early" */
|
|
|
if (unlikely(fatal_signal_pending(current))) {
|
|
|
- if ((fault & VM_FAULT_ERROR) && !(fault & VM_FAULT_RETRY))
|
|
|
- up_read(&mm->mmap_sem);
|
|
|
- if (user_mode(regs))
|
|
|
+
|
|
|
+ /*
|
|
|
+ * if fault retry, mmap_sem already relinquished by core mm
|
|
|
+ * so OK to return to user mode (with signal handled first)
|
|
|
+ */
|
|
|
+ if (fault & VM_FAULT_RETRY) {
|
|
|
+ if (!user_mode(regs))
|
|
|
+ goto no_context;
|
|
|
return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
|