ARM64: fix framepointer check in unwind_frame
authorKonstantin Khlebnikov <k.khlebnikov@samsung.com>
Thu, 5 Dec 2013 13:30:16 +0000 (13:30 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 19 Dec 2013 17:43:10 +0000 (17:43 +0000)
We need at least 24 bytes above frame pointer.

Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/stacktrace.c

index d25459ff57fc18c387ad9a1d7130f0934dbbfc8e..c3b6c63ea5fb3abe0f154544aee2eb09063c0eb8 100644 (file)
@@ -43,7 +43,7 @@ int unwind_frame(struct stackframe *frame)
        low  = frame->sp;
        high = ALIGN(low, THREAD_SIZE);
 
-       if (fp < low || fp > high || fp & 0xf)
+       if (fp < low || fp > high - 0x18 || fp & 0xf)
                return -EINVAL;
 
        frame->sp = fp + 0x10;