ARM: 7913/1: fix framepointer check in unwind_frame
[cascardo/linux.git] / arch / arm / kernel / stacktrace.c
index 00f79e5..af4e8c8 100644 (file)
@@ -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 */