Skip to content

Commit 601f887

Browse files
committed
Merge tag 'pm-urgent-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fix from Rafael Wysocki: "Fix a nasty (and really hard to debug) memory corruption during resume from hibernation on x86-64 (that leads to a kernel panic most of the time) due to the use of a stale stack pointer value in FRAME_BEGIN (Josh Poimboeuf)" * tag 'pm-urgent-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: x86/power/64: Fix hibernation return address corruption
2 parents 574c7e2 + e148d0f commit 601f887

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arch/x86/power/hibernate_asm_64.S

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <asm/frame.h>
2525

2626
ENTRY(swsusp_arch_suspend)
27-
FRAME_BEGIN
2827
movq $saved_context, %rax
2928
movq %rsp, pt_regs_sp(%rax)
3029
movq %rbp, pt_regs_bp(%rax)
@@ -48,6 +47,7 @@ ENTRY(swsusp_arch_suspend)
4847
movq %cr3, %rax
4948
movq %rax, restore_cr3(%rip)
5049

50+
FRAME_BEGIN
5151
call swsusp_save
5252
FRAME_END
5353
ret
@@ -104,7 +104,6 @@ ENTRY(core_restore_code)
104104
/* code below belongs to the image kernel */
105105
.align PAGE_SIZE
106106
ENTRY(restore_registers)
107-
FRAME_BEGIN
108107
/* go back to the original page tables */
109108
movq %r9, %cr3
110109

@@ -145,6 +144,5 @@ ENTRY(restore_registers)
145144
/* tell the hibernation core that we've just restored the memory */
146145
movq %rax, in_suspend(%rip)
147146

148-
FRAME_END
149147
ret
150148
ENDPROC(restore_registers)

0 commit comments

Comments
 (0)