Commit e26db7ad authored by Guo Ren's avatar Guo Ren
Browse files

csky: mm: abort uaccess retries upon fatal signal

Pick up the patch from the 'Link' made by Mark Rutland. Keep the
same with x86, arm, arm64, arc, sh, power.

Link: https://lore.kernel.org/linux-arm-kernel/1499782763-31418-1-git-send-email-mark.rutland@arm.com/


Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
Cc: Mark Rutland <mark.rutland@arm.com>
parent bd0bf90e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -279,8 +279,11 @@ asmlinkage void do_page_fault(struct pt_regs *regs)
	 * signal first. We do not need to release the mmap_lock because it
	 * would already be released in __lock_page_or_retry in mm/filemap.c.
	 */
	if (fault_signal_pending(fault, regs))
	if (fault_signal_pending(fault, regs)) {
		if (!user_mode(regs))
			no_context(regs, addr);
		return;
	}

	if (unlikely((fault & VM_FAULT_RETRY) && (flags & FAULT_FLAG_ALLOW_RETRY))) {
		flags |= FAULT_FLAG_TRIED;