[PATCH] PM: hibernate: Preserve error status in create_image()
From: Lenny Szubowicz
Date: Mon Jun 01 2026 - 15:01:52 EST
Prevent hibernation errors that are encountered in create_image()
from being overwritten by a success from arch_resume_nosmt() on
the routine exit cleanup path.
Fixes: ec527c318036 ("x86/power: Fix 'nosmt' vs hibernation triple fault during resume")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Lenny Szubowicz <lszubowi@xxxxxxxxxx>
---
kernel/power/hibernate.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index af8d07bafe02..2e837a9c617b 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -324,6 +324,7 @@ __weak int arch_resume_nosmt(void)
static int create_image(int platform_mode)
{
int error;
+ int nosmt_err;
error = dpm_suspend_end(PMSG_FREEZE);
if (error) {
@@ -380,8 +381,11 @@ static int create_image(int platform_mode)
pm_sleep_enable_secondary_cpus();
/* Allow architectures to do nosmt-specific post-resume dances */
- if (!in_suspend)
- error = arch_resume_nosmt();
+ if (!in_suspend) {
+ nosmt_err = arch_resume_nosmt();
+ if (!error)
+ error = nosmt_err;
+ }
Platform_finish:
platform_finish(platform_mode);
--
2.54.0