diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-07-10 15:10:41 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-07-15 14:56:37 +0200 |
| commit | 996afb6efd1a345736f9a888e4d6c7d4f3752aa5 (patch) | |
| tree | 659783b7014775c37c4ba9c3908cccd95d5de009 | |
| parent | 80b1516e07c53f0b4df2f53d53f8fac4052d6ac2 (diff) | |
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: 2965faa5e03d ("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>
| -rw-r--r-- | kernel/kexec_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index 3a9a9f240dbc..554369595298 100644 --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -1080,7 +1080,7 @@ int kernel_kexec(void) console_suspend_all(); error = dpm_suspend_start(PMSG_FREEZE); if (error) - goto Resume_console; + goto Resume_devices; /* * dpm_suspend_end() must be called after dpm_suspend_start() * to complete the transition, like in the hibernation flows @@ -1135,7 +1135,6 @@ int kernel_kexec(void) dpm_resume_start(PMSG_RESTORE); Resume_devices: dpm_resume_end(PMSG_RESTORE); - Resume_console: pm_restore_gfp_mask(); console_resume_all(); thaw_processes(); |
