Skip to content

Commit

Permalink
csky: mm: abort uaccess retries upon fatal signal
Browse files Browse the repository at this point in the history
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/[email protected]/
Signed-off-by: Guo Ren <[email protected]>
Cc: Mark Rutland <[email protected]>
  • Loading branch information
guoren83 committed Jan 12, 2021
1 parent bd0bf90 commit e26db7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/csky/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e26db7a

Please sign in to comment.