diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-06-29 14:56:23 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-06-29 14:56:23 +0200 |
commit | 7380534314865528ef080593b291bba32fba60e8 (patch) | |
tree | d9723ff4d5bdb3533a75eea099df1ded2a95a4b8 /arch/s390/kernel | |
parent | c406abd3a6d0cf5ce8db4db155a729a28fb98c4f (diff) | |
download | op-kernel-dev-7380534314865528ef080593b291bba32fba60e8.zip op-kernel-dev-7380534314865528ef080593b291bba32fba60e8.tar.gz |
[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>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/traps.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index a46793b..b763043 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) unsigned long *stack; int i; - // debugging aid: "show_stack(NULL);" prints the - // back trace for this cpu. - if (!sp) - sp = task ? (unsigned long *) task->thread.ksp : __r15; + stack = task ? (unsigned long *) task->thread.ksp : __r15; + else + stack = sp; - stack = sp; for (i = 0; i < kstack_depth_to_print; i++) { if (((addr_t) stack & (THREAD_SIZE-1)) == 0) break; |