Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] PM: hibernate: Restore GFP mask in power_down() for HIBERNATION_PLATFORM
@ 2025-10-26  3:31 Mario Limonciello (AMD)
  2025-10-26  8:37 ` Askar Safin
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mario Limonciello (AMD) @ 2025-10-26  3:31 UTC (permalink / raw)
  To: mario.limonciello, rafael, lenb, pavel, superm1
  Cc: Askar Safin, rafael.j.wysocki, linux-pm

commit 449c9c02537a1 ("PM: hibernate: Restrict GFP mask in
hibernation_snapshot()") added a restrict GFP mask call that leads to
mismatch when using the platform for hibernation.  As part of calling
hibernation_platform_enter() the mask will be restricted when calling
dpm_suspend_start().

This is a similar problem as occurred with hybrid sleep that was fixed
by commit 469d80a3712c6 ("PM: hibernate: Fix hybrid-sleep").

Restore GFP maks as part of power_down() in HIBERNATION_PLATFORM case
to fix the mismatch.

Reported-by: Askar Safin <safinaskar@gmail.com>
Closes: https://lore.kernel.org/linux-pm/20251025050812.421905-1-safinaskar@gmail.com/
Fixes: 449c9c02537a1 ("PM: hibernate: Restrict GFP mask in hibernation_snapshot()")
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
---
 kernel/power/hibernate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 14e85ff235512..e15907f28c4cd 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -721,6 +721,7 @@ static void power_down(void)
 		kernel_restart(NULL);
 		break;
 	case HIBERNATION_PLATFORM:
+		pm_restore_gfp_mask();
 		error = hibernation_platform_enter();
 		if (error == -EAGAIN || error == -EBUSY) {
 			events_check_enabled = false;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-10-28 21:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-26  3:31 [PATCH] PM: hibernate: Restore GFP mask in power_down() for HIBERNATION_PLATFORM Mario Limonciello (AMD)
2025-10-26  8:37 ` Askar Safin
2025-10-26 13:05 ` Rafael J. Wysocki
2025-10-28 11:17 ` Askar Safin
2025-10-28 11:49   ` Rafael J. Wysocki
2025-10-28 12:56     ` Askar Safin
2025-10-28 15:12       ` Rafael J. Wysocki
2025-10-28 21:06         ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox