1
0
Fork 0

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>
hifive-unleashed-5.1
Chung-Ling Tang 2015-02-09 09:40:50 +08:00 committed by Ley Foon Tan
parent e36f014edf
commit a3248d609b
1 changed files with 5 additions and 3 deletions

View 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;
}