All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mario Limonciello (AMD)" <superm1@kernel.org>
To: mario.limonciello@amd.com, rafael@kernel.org, lenb@kernel.org,
	pavel@kernel.org, superm1@kernel.org
Cc: Askar Safin <safinaskar@gmail.com>,
	rafael.j.wysocki@intel.com, linux-pm@vger.kernel.org
Subject: [PATCH] PM: hibernate: Restore GFP mask in power_down() for HIBERNATION_PLATFORM
Date: Sat, 25 Oct 2025 22:31:00 -0500	[thread overview]
Message-ID: <20251026033115.436448-1-superm1@kernel.org> (raw)

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


             reply	other threads:[~2025-10-26  3:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-26  3:31 Mario Limonciello (AMD) [this message]
2025-10-26  8:37 ` [PATCH] PM: hibernate: Restore GFP mask in power_down() for HIBERNATION_PLATFORM 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251026033115.436448-1-superm1@kernel.org \
    --to=superm1@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=pavel@kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=safinaskar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.