[PATCH 1/3] unwind_stack(): return ra if an exception occured at the first instruction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Franck Bui-Huu <vagabon.xyz@xxxxxxxxx>
---
 arch/mips/kernel/process.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 951bf9c..e7b0b38 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -465,8 +465,11 @@ unsigned long unwind_stack(struct task_s
 
 	if (!kallsyms_lookup(pc, &size, &ofs, &modname, namebuf))
 		return 0;
-	if (ofs == 0)
-		return 0;
+	/*
+	 * Return ra if an exception occured at the first instruction
+	 */
+	if (unlikely(ofs == 0))
+		return ra;
 
 	info.func = (void *)(pc - ofs);
 	info.func_size = ofs;	/* analyze from start to ofs */
-- 
1.4.2.rc4



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux