From: Chung-Ling Tang Date: Mon, 9 Feb 2015 01:40:50 +0000 (+0800) Subject: nios2: fix unhandled signals X-Git-Tag: v3.19~1^2 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=a3248d609bd4514932bac291356e6a89abf259bc;p=cascardo%2Flinux.git nios2: fix unhandled signals Follow other architectures for user fault handling. Signed-off-by: Chung-Ling Tang Acked-by: Ley Foon Tan --- diff --git a/arch/nios2/mm/fault.c b/arch/nios2/mm/fault.c index 34429d5a0ccd..d194c0427b26 100644 --- a/arch/nios2/mm/fault.c +++ b/arch/nios2/mm/fault.c @@ -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; }