Skip to content

Commit

Permalink
Merge tag 'pm-urgent-4.8-rc1' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/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
  • Loading branch information
Linus Torvalds committed Jul 29, 2016
2 parents 574c7e2 + e148d0f commit 601f887
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/x86/power/hibernate_asm_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <asm/frame.h>

ENTRY(swsusp_arch_suspend)
FRAME_BEGIN
movq $saved_context, %rax
movq %rsp, pt_regs_sp(%rax)
movq %rbp, pt_regs_bp(%rax)
Expand All @@ -48,6 +47,7 @@ ENTRY(swsusp_arch_suspend)
movq %cr3, %rax
movq %rax, restore_cr3(%rip)

FRAME_BEGIN
call swsusp_save
FRAME_END
ret
Expand Down Expand Up @@ -104,7 +104,6 @@ ENTRY(core_restore_code)
/* code below belongs to the image kernel */
.align PAGE_SIZE
ENTRY(restore_registers)
FRAME_BEGIN
/* go back to the original page tables */
movq %r9, %cr3

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

FRAME_END
ret
ENDPROC(restore_registers)

0 comments on commit 601f887

Please sign in to comment.