diff options
author | Konstantin Khlebnikov <k.khlebnikov@samsung.com> | 2013-12-05 14:23:48 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-12-09 23:24:33 +0000 |
commit | 3abb6671a9c04479c4bd026798a05f857393b7e2 (patch) | |
tree | c27d0ed62506b334564c7223616b783f4a1a35a8 /arch/arm/kernel/stacktrace.c | |
parent | 1b15ec7a7427d4188ba91b9bbac696250a059d22 (diff) | |
download | op-kernel-dev-3abb6671a9c04479c4bd026798a05f857393b7e2.zip op-kernel-dev-3abb6671a9c04479c4bd026798a05f857393b7e2.tar.gz |
ARM: 7913/1: fix framepointer check in unwind_frame
This patch fixes corner case when (fp + 4) overflows unsigned long,
for example: fp = 0xFFFFFFFF -> fp + 4 == 3.
Cc: <stable@vger.kernel.org>
Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/stacktrace.c')
-rw-r--r-- | arch/arm/kernel/stacktrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c index 00f79e5..af4e8c8 100644 --- a/arch/arm/kernel/stacktrace.c +++ b/arch/arm/kernel/stacktrace.c @@ -31,7 +31,7 @@ int notrace unwind_frame(struct stackframe *frame) high = ALIGN(low, THREAD_SIZE); /* check current frame pointer is within bounds */ - if (fp < (low + 12) || fp + 4 >= high) + if (fp < low + 12 || fp > high - 4) return -EINVAL; /* restore the registers from the stack frame */ |