Skip to content

Commit a3248d6

Browse files
Chung-Ling TangLey Foon Tan
authored andcommitted
nios2: fix unhandled signals
Follow other architectures for user fault handling. Signed-off-by: Chung-Ling Tang <cltang@codesourcery.com> Acked-by: Ley Foon Tan <lftan@altera.com>
1 parent e36f014 commit a3248d6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

arch/nios2/mm/fault.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,11 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long cause,
159159
bad_area_nosemaphore:
160160
/* User mode accesses just cause a SIGSEGV */
161161
if (user_mode(regs)) {
162-
pr_alert("%s: unhandled page fault (%d) at 0x%08lx, "
163-
"cause %ld\n", current->comm, SIGSEGV, address, cause);
164-
show_regs(regs);
162+
if (unhandled_signal(current, SIGSEGV) && printk_ratelimit()) {
163+
pr_info("%s: unhandled page fault (%d) at 0x%08lx, "
164+
"cause %ld\n", current->comm, SIGSEGV, address, cause);
165+
show_regs(regs);
166+
}
165167
_exception(SIGSEGV, regs, code, address);
166168
return;
167169
}

0 commit comments

Comments
 (0)