mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
PM: hibernate: Restrict GFP mask in power_down()
Commit12ffc3b151("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:12ffc3b151("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>
This commit is contained in:
parent
bbfe987c5a
commit
6f4c6f9ed4
|
|
@ -733,6 +733,8 @@ static void power_down(void)
|
|||
case HIBERNATION_PLATFORM:
|
||||
error = hibernation_platform_enter();
|
||||
if (error == -EAGAIN || error == -EBUSY) {
|
||||
/* Match pm_restore_gfp_mask() in hibernate(). */
|
||||
pm_restrict_gfp_mask();
|
||||
swsusp_unmark();
|
||||
events_check_enabled = false;
|
||||
pr_info("Wakeup event detected during hibernation, rolling back.\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user