[PATCH] arm: end_of_stack()
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 12 Jan 2006 09:05:57 +0000 (01:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 12 Jan 2006 17:08:56 +0000 (09:08 -0800)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/arm/kernel/process.c
arch/arm/kernel/traps.c

index 91d107d33c8d243a729b80d6e3840c810de7ee7c..ac6ed955ca0f41f72e83154ddf0a325864c1c92e 100644 (file)
@@ -459,7 +459,7 @@ unsigned long get_wchan(struct task_struct *p)
        if (!p || p == current || p->state == TASK_RUNNING)
                return 0;
 
-       stack_start = (unsigned long)(p->thread_info + 1);
+       stack_start = (unsigned long)end_of_stack(p);
        stack_end = ((unsigned long)p->thread_info) + THREAD_SIZE;
 
        fp = thread_saved_fp(p);
index c9fe6f5f7ee35ac6df900efcf06c85cd908e3a15..c1a04ec830d1b2a70958ea551234b52a001c2bf1 100644 (file)
@@ -164,7 +164,7 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
        } else if (verify_stack(fp)) {
                printk("invalid frame pointer 0x%08x", fp);
                ok = 0;
-       } else if (fp < (unsigned long)(tsk->thread_info + 1))
+       } else if (fp < (unsigned long)end_of_stack(tsk))
                printk("frame pointer underflow");
        printk("\n");