x86/suspend: fix false positive KASAN warning on suspend/resume
[linux-2.6-microblaze.git] / arch / x86 / kernel / acpi / wakeup_64.S
index 169963f..50b8ed0 100644 (file)
@@ -109,6 +109,15 @@ ENTRY(do_suspend_lowlevel)
        movq    pt_regs_r14(%rax), %r14
        movq    pt_regs_r15(%rax), %r15
 
+#ifdef CONFIG_KASAN
+       /*
+        * The suspend path may have poisoned some areas deeper in the stack,
+        * which we now need to unpoison.
+        */
+       movq    %rsp, %rdi
+       call    kasan_unpoison_task_stack_below
+#endif
+
        xorl    %eax, %eax
        addq    $8, %rsp
        FRAME_END