rk3288:pmic:act8846:support pmic act8846 for new hardware
[firefly-linux-kernel-4.4.55.git] / arch / arm / kernel / stacktrace.c
index 381d23a497c16b2f682da4b7a81c42af92ae9f70..af4e8c8a5422c4383396f7f4b3a836a67426b7de 100644 (file)
@@ -1,4 +1,4 @@
-#include <linux/module.h>
+#include <linux/export.h>
 #include <linux/sched.h>
 #include <linux/stacktrace.h>
 
@@ -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 */