aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-06-29 08:56:23 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-06-29 08:56:23 -0400
commit7380534314865528ef080593b291bba32fba60e8 (patch)
treed9723ff4d5bdb3533a75eea099df1ded2a95a4b8
parentc406abd3a6d0cf5ce8db4db155a729a28fb98c4f (diff)
[S390] incomplete stack traces.
show_stack() passes a pointer to the current stack frame to show_trace(). Because of tail call optimization the pointer doesn't point to the original stack frame anymory and therefore traces are wrong. Don't pass the pointer of the current stack frame to show_trace(). Instead let show_trace() calculate the pointer on its own. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/traps.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index a46793beeddd..b7630436f693 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -150,13 +150,11 @@ void show_stack(struct task_struct *task, unsigned long *sp)
150 unsigned long *stack; 150 unsigned long *stack;
151 int i; 151 int i;
152 152
153 // debugging aid: "show_stack(NULL);" prints the
154 // back trace for this cpu.
155
156 if (!sp) 153 if (!sp)
157 sp = task ? (unsigned long *) task->thread.ksp : __r15; 154 stack = task ? (unsigned long *) task->thread.ksp : __r15;
155 else
156 stack = sp;
158 157
159 stack = sp;
160 for (i = 0; i < kstack_depth_to_print; i++) { 158 for (i = 0; i < kstack_depth_to_print; i++) {
161 if (((addr_t) stack & (THREAD_SIZE-1)) == 0) 159 if (((addr_t) stack & (THREAD_SIZE-1)) == 0)
162 break; 160 break;