Skip to content

Commit

Permalink
nios2: fix unhandled signals
Browse files Browse the repository at this point in the history
Follow other architectures for user fault handling.

Signed-off-by: Chung-Ling Tang <[email protected]>
Acked-by: Ley Foon Tan <[email protected]>
  • Loading branch information
Chung-Ling Tang authored and Ley Foon Tan committed Feb 9, 2015
1 parent e36f014 commit a3248d6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions arch/nios2/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,11 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long cause,
bad_area_nosemaphore:
/* User mode accesses just cause a SIGSEGV */
if (user_mode(regs)) {
pr_alert("%s: unhandled page fault (%d) at 0x%08lx, "
"cause %ld\n", current->comm, SIGSEGV, address, cause);
show_regs(regs);
if (unhandled_signal(current, SIGSEGV) && printk_ratelimit()) {
pr_info("%s: unhandled page fault (%d) at 0x%08lx, "
"cause %ld\n", current->comm, SIGSEGV, address, cause);
show_regs(regs);
}
_exception(SIGSEGV, regs, code, address);
return;
}
Expand Down

0 comments on commit a3248d6

Please sign in to comment.