diff mbox

arm64: print bad_frame in handle_signal

Message ID 20161222113501.17167-1-bamvor.zhangjian@huawei.com
State New
Headers show

Commit Message

Zhangjian (Bamvor) Dec. 22, 2016, 11:35 a.m. UTC
From: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>


Sometims handle_signal will fail due to the bad frame and send to
segfault to process consequently. But there is no information in system
log which lead to hard to debug the root issue.

This patch add as same bad frame print as sys_rt_sigreturn.

Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>

---
 arch/arm64/kernel/signal.c | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.10.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff mbox

Patch

diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c
index c7b6de6..cd6b81b 100644
--- a/arch/arm64/kernel/signal.c
+++ b/arch/arm64/kernel/signal.c
@@ -316,6 +316,10 @@  static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)
 	if (!ret)
 		user_fastforward_single_step(tsk);
 
+	if (show_unhandled_signals)
+		pr_info_ratelimited("%s[%d]: bad frame in %s: pc=%08llx sp=%08llx\n",
+				    current->comm, task_pid_nr(current),
+				    __func__, regs->pc, regs->sp);
 	signal_setup_done(ret, ksig, 0);
 }