]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[S390] incomplete stack traces.
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 29 Jun 2006 12:56:23 +0000 (14:56 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 29 Jun 2006 12:56:23 +0000 (14:56 +0200)
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>
arch/s390/kernel/traps.c

index a46793beeddda592d70797ed79fc4c462477f1d6..b7630436f693cda60aa7976b8c3a9b43212ab327 100644 (file)
@@ -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;