diff options
Diffstat (limited to 'arch/csky')
-rw-r--r-- | arch/csky/mm/fault.c | 5 |
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; |