[PATCH] PM: hibernate: Don't lose create_image() errors to arch_resume_nosmt()
From: Cole Leavitt
Date: Sun Oct 18 2026 - 12:45:11 EST
create_image() calls arch_resume_nosmt() on every path that returns
with in_suspend cleared and assigns its return value to error. That
includes the error paths taken when pm_sleep_disable_secondary_cpus()
or syscore_suspend() fails, which jump to Enable_cpus/Enable_irqs.
When SMT is not disabled (for example on CPUs without SMT, where
cpu_smt_control is CPU_SMT_NOT_SUPPORTED), arch_resume_nosmt() returns
0, so the failure is lost: create_image() returns 0 with in_suspend
unset, hibernation_snapshot() treats that as a successful restore and
hibernate() reports success to user space although no image was
created. A wakeup event that aborts image creation in syscore_suspend()
is thus indistinguishable from resuming a hibernation image.
Only call arch_resume_nosmt() when image creation succeeded. Failures
now propagate, so a wakeup event that makes syscore_suspend() fail
returns -EBUSY to user space, like wakeup aborts in freeze_processes()
and dpm_suspend() already do.
Fixes: ec527c318036 ("x86/power: Fix 'nosmt' vs hibernation triple fault during resume")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Cole Leavitt <cole@xxxxxxxxx>
---
Notes:
Tested on a Lenovo ThinkPad P16 Gen 3 (Core Ultra 9 275HX, JHL9580
Barlow Ridge host, I226 Ethernet), in daily use since 2026-09-17.
kernel/power/hibernate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index c13f68ab7f6e..f53f844114a1 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -380,7 +380,7 @@ static int create_image(int platform_mode)
pm_sleep_enable_secondary_cpus();
/* Allow architectures to do nosmt-specific post-resume dances */
- if (!in_suspend)
+ if (!in_suspend && !error)
error = arch_resume_nosmt();
Platform_finish:
base-commit: 32c52ec87d6245ee2d12ed5dd509e40062939b50
--
2.54.0