summaryrefslogtreecommitdiff
path: root/arch/csky
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2020-12-30 10:06:22 +0000
committerGuo Ren <guoren@linux.alibaba.com>2021-01-12 09:52:41 +0800
commite26db7ad9c319496bcbe6043d9d4e1d1da3ec613 (patch)
tree9151d4e1da9a6041d174edfaec3b63cfce06962d /arch/csky
parentbd0bf90e30c4b886ec10c12498cd56d8e41aaaf3 (diff)
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>
Diffstat (limited to 'arch/csky')
-rw-r--r--arch/csky/mm/fault.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/csky/mm/fault.c b/arch/csky/mm/fault.c
index c7b67976bac4..1482de56f4f7 100644
--- a/arch/csky/mm/fault.c
+++ b/arch/csky/mm/fault.c
@@ -279,8 +279,11 @@ good_area:
* 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;