Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3248d60 authored by Chung-Ling Tang's avatar Chung-Ling Tang Committed by Ley Foon Tan
Browse files

nios2: fix unhandled signals



Follow other architectures for user fault handling.

Signed-off-by: default avatarChung-Ling Tang <cltang@codesourcery.com>
Acked-by: default avatarLey Foon Tan <lftan@altera.com>
parent e36f014e
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -159,9 +159,11 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long cause,
bad_area_nosemaphore:
bad_area_nosemaphore:
	/* User mode accesses just cause a SIGSEGV */
	/* User mode accesses just cause a SIGSEGV */
	if (user_mode(regs)) {
	if (user_mode(regs)) {
		pr_alert("%s: unhandled page fault (%d) at 0x%08lx, "
		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);
				"cause %ld\n", current->comm, SIGSEGV, address, cause);
			show_regs(regs);
			show_regs(regs);
		}
		_exception(SIGSEGV, regs, code, address);
		_exception(SIGSEGV, regs, code, address);
		return;
		return;
	}
	}