Skip to content

Commit e26db7a

Browse files
committed
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: Guo Ren <guoren@linux.alibaba.com> Cc: Mark Rutland <mark.rutland@arm.com>
1 parent bd0bf90 commit e26db7a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎arch/csky/mm/fault.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,11 @@ asmlinkage void do_page_fault(struct pt_regs *regs)
279279
* signal first. We do not need to release the mmap_lock because it
280280
* would already be released in __lock_page_or_retry in mm/filemap.c.
281281
*/
282-
if (fault_signal_pending(fault, regs))
282+
if (fault_signal_pending(fault, regs)) {
283+
if (!user_mode(regs))
284+
no_context(regs, addr);
283285
return;
286+
}
284287

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

0 commit comments

Comments
 (0)