]> git.ipfire.org Git - thirdparty/linux.git/commit
PM: hibernate: Restrict GFP mask in power_down()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 26 Sep 2025 16:40:25 +0000 (18:40 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 26 Sep 2025 16:55:23 +0000 (18:55 +0200)
commit6f4c6f9ed4ce65303f6bb153e2afc71bc33c8ded
tree29a47858c2a572e6122f58629a322527466928e7
parentbbfe987c5a2854705393ad79813074e5eadcbde6
PM: hibernate: Restrict GFP mask in power_down()

Commit 12ffc3b1513e ("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: 12ffc3b1513e ("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>
kernel/power/hibernate.c