Commit a3248d609bd4514932bac291356e6a89abf259bc

Authored by Chung-Ling Tang
Committed by Ley Foon Tan
1 parent e36f014edf

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>

Showing 1 changed file with 5 additions and 3 deletions Side-by-side Diff

arch/nios2/mm/fault.c
... ... @@ -159,9 +159,11 @@
159 159 bad_area_nosemaphore:
160 160 /* User mode accesses just cause a SIGSEGV */
161 161 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 + }
165 167 _exception(SIGSEGV, regs, code, address);
166 168 return;
167 169 }