aboutsummaryrefslogtreecommitdiffstats
path: root/arch/nios2/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/nios2/mm/fault.c')
-rw-r--r--arch/nios2/mm/fault.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/nios2/mm/fault.c b/arch/nios2/mm/fault.c
index 15a0bb5fc06d..d194c0427b26 100644
--- a/arch/nios2/mm/fault.c
+++ b/arch/nios2/mm/fault.c
@@ -135,6 +135,8 @@ survive:
135 if (unlikely(fault & VM_FAULT_ERROR)) { 135 if (unlikely(fault & VM_FAULT_ERROR)) {
136 if (fault & VM_FAULT_OOM) 136 if (fault & VM_FAULT_OOM)
137 goto out_of_memory; 137 goto out_of_memory;
138 else if (fault & VM_FAULT_SIGSEGV)
139 goto bad_area;
138 else if (fault & VM_FAULT_SIGBUS) 140 else if (fault & VM_FAULT_SIGBUS)
139 goto do_sigbus; 141 goto do_sigbus;
140 BUG(); 142 BUG();
@@ -157,9 +159,11 @@ bad_area:
157bad_area_nosemaphore: 159bad_area_nosemaphore:
158 /* User mode accesses just cause a SIGSEGV */ 160 /* User mode accesses just cause a SIGSEGV */
159 if (user_mode(regs)) { 161 if (user_mode(regs)) {
160 pr_alert("%s: unhandled page fault (%d) at 0x%08lx, " 162 if (unhandled_signal(current, SIGSEGV) && printk_ratelimit()) {
161 "cause %ld\n", current->comm, SIGSEGV, address, cause); 163 pr_info("%s: unhandled page fault (%d) at 0x%08lx, "
162 show_regs(regs); 164 "cause %ld\n", current->comm, SIGSEGV, address, cause);
165 show_regs(regs);
166 }
163 _exception(SIGSEGV, regs, code, address); 167 _exception(SIGSEGV, regs, code, address);
164 return; 168 return;
165 } 169 }