Skip to content

Commit 7fe8377

Browse files
committed
PM: hibernate: Restrict GFP mask in power_down()
JIRA: https://issues.redhat.com/browse/RHEL-109250 commit 6f4c6f9 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Fri Sep 26 18:40:25 2025 +0200 Commit 12ffc3b ("PM: Restrict swap use to later in the suspend sequence") caused hibernation_platform_enter() to call pm_restore_gfp_mask() via dpm_resume_end(), so when power_down() returns after aborting hibernation_platform_enter(), it needs to match the pm_restore_gfp_mask() call in hibernate() that will occur subsequently. Address this by adding a pm_restrict_gfp_mask() call to the relevant error path in power_down(). Fixes: 12ffc3b ("PM: Restrict swap use to later in the suspend sequence") Cc: 6.16+ <stable@vger.kernel.org> # 6.16+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
1 parent f75447c commit 7fe8377

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/power/hibernate.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,8 @@ static void power_down(void)
685685
case HIBERNATION_PLATFORM:
686686
error = hibernation_platform_enter();
687687
if (error == -EAGAIN || error == -EBUSY) {
688+
/* Match pm_restore_gfp_mask() in hibernate(). */
689+
pm_restrict_gfp_mask();
688690
swsusp_unmark();
689691
events_check_enabled = false;
690692
pr_info("Wakeup event detected during hibernation, rolling back.\n");

0 commit comments

Comments
 (0)