ARM: 6468/1: backtrace: fix calculation of thread stack base
authorWill Deacon <will.deacon@arm.com>
Thu, 4 Nov 2010 17:22:51 +0000 (18:22 +0100)
committerMatt Sealey <matt@genesi-usa.com>
Sat, 22 Jan 2011 04:15:29 +0000 (22:15 -0600)
commit7ca8e0948a6234bc3247f8b1156581c5da3894bd
tree25db756420bbfdcce8aa967054dc31fd1f8b8962
parenta85f67d5e72aeadbfb1d487add0dd2e660dbbbdb
ARM: 6468/1: backtrace: fix calculation of thread stack base

When unwinding stack frames we must take care not to unwind
areas of memory that lie outside of the known extent of the stack.

This patch fixes an incorrect calculation of the stack base where
THREAD_SIZE is added to the stack pointer after it has already
been aligned to this value. Since the ALIGN macro performs this
addition internally, we end up overshooting the base by 8k.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/stacktrace.c
arch/arm/kernel/unwind.c