Skip to content

Commit 996afb6

Browse files
committed
kexec_core: Fix error code path in the KEXEC_JUMP flow
If dpm_suspend_start() fails, dpm_resume_end() must be called to recover devices whose suspend callbacks have been called, but this does not happen in the KEXEC_JUMP flow's error path due to a confused goto target label. Address this by using the correct target label in the goto statement in question and drop the Resume_console label that is not used any more. Fixes: 2965faa ("kexec: split kexec_load syscall from kexec core code") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Baoquan He <bhe@redhat.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patch.msgid.link/2396879.ElGaqSPkdT@rjwysocki.net [ rjw: Drop unused label and amend the changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 80b1516 commit 996afb6

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

kernel/kexec_core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ int kernel_kexec(void)
10801080
console_suspend_all();
10811081
error = dpm_suspend_start(PMSG_FREEZE);
10821082
if (error)
1083-
goto Resume_console;
1083+
goto Resume_devices;
10841084
/*
10851085
* dpm_suspend_end() must be called after dpm_suspend_start()
10861086
* to complete the transition, like in the hibernation flows
@@ -1135,7 +1135,6 @@ int kernel_kexec(void)
11351135
dpm_resume_start(PMSG_RESTORE);
11361136
Resume_devices:
11371137
dpm_resume_end(PMSG_RESTORE);
1138-
Resume_console:
11391138
pm_restore_gfp_mask();
11401139
console_resume_all();
11411140
thaw_processes();

0 commit comments

Comments
 (0)