nios2: fix unhandled signals
authorChung-Ling Tang <cltang@codesourcery.com>
Mon, 9 Feb 2015 01:40:50 +0000 (09:40 +0800)
committerLey Foon Tan <lftan@altera.com>
Mon, 9 Feb 2015 01:47:05 +0000 (09:47 +0800)
Follow other architectures for user fault handling.

Signed-off-by: Chung-Ling Tang <cltang@codesourcery.com>
Acked-by: Ley Foon Tan <lftan@altera.com>
arch/nios2/mm/fault.c

index 34429d5..d194c04 100644 (file)
@@ -159,9 +159,11 @@ bad_area:
 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;
        }